Hi,
I need to pass byte array from C# code to outsystems, I'm not able to create a variable in outsystems that matches with byte array coming from the C#.
Thanks,
Bhuvan.
When you create a Binary Data output parameter within Integration Studio, it shows up in C# code as "out byte[] name". Best practice is probably to create the action within integration studio and then edit the C# function generated for you, rather than trying to map out the type with what you may expect.
As an example, see this simple action I created for adding page numbers to a PDF file. I edited only the lines between 30 and 52, and not the function signature (which was generated by Integration Studio).
Hi Bhuvan,
Can you please tell us what this byte array contains? I mean it is file, text, JOSN, Image?
private static IEnumerable XorOfRandom(string randomKeySender, string randomKeyReceiver)
{
var randomKeySenderBytes = GetByteFromBase64(randomKeySender).ToArray();
var randomKeyReceiverBytes = GetByteFromBase64(randomKeyReceiver).ToArray();
var sb = new byte[randomKeyReceiverBytes.Length];
for (var i = 0; i < randomKeySenderBytes.Length; i++)
sb[i] = (byte) (randomKeySenderBytes[i] ^ randomKeyReceiverBytes[i % randomKeyReceiverBytes.Length]);
}
return sb;
Hello,
In OutSystems, you can use the "Binary Data" data type to handle byte arrays in C# extensions.