problems durring conversion byte[]

  • Thread starter Thread starter user
  • Start date Start date
U

user

Hello
i have:
byte [] b1;
byte [] b2;

i want to copy 5 elements from b1 (starting from index 10)
into b2 (starting from index 0).
How can i do it ? Does .NET have any possibility to do that ?
or i have to use pointers and unsafe ?


Thanx
 
Hello
i have:
byte [] b1;
byte [] b2;

i want to copy 5 elements from b1 (starting from index 10)
into b2 (starting from index 0).
How can i do it ? Does .NET have any possibility to do that ?
or i have to use pointers and unsafe ?

Array.Copy (b1, 10, b2, 0, 5)

(Assuming b2 is already large enough, of course.)
 
Back
Top