I\'ve got a function which fills an array of type sbyte[], and I need to pass this array to another function which accepts a parameter of type byte[].
Can I convert
Yes, you can. Since both byte and sbyte have the same binary representation there's no need to copy the data. Just do a cast to Array, then cast it to byte[] and it'll be enough.
byte
sbyte
byte[]
sbyte[] signed = { -2, -1, 0, 1, 2 }; byte[] unsigned = (byte[]) (Array)signed;