I'm building up a composite of a number of byte arrays. I'd like to do this quickly but looking for a smart way of doing this:
uint A = 1000;
uint B = 2000;
Key[0:3] = BitConverter.GetBytes(A);
Key[4:7] = BitConverter.GetBytes(B);
I cannot see an easy way to do this. I do not want to use LINQ. Where BitConverter.GetBytes(A) returns 4 bytes. Of course I can do 16 assignments but this is messy. Is there any good looking syntax that is fast?