copy buffer not from first element question  
Author Message
Arkady Frenkel





PostPosted: Visual C# Language, copy buffer not from first element question Top

Hi, guys!
Is it possible to write byte array, I receive already, from one stream to another, but not from first element, without copy part of array to new one. I mean I have byte[] array and need to do stream.Write( array from element i,0, array.Length - i )
TIA
Arkady


Visual C#12  
 
 
Brendan Grant





PostPosted: Visual C# Language, copy buffer not from first element question Top

Isn't Stream.Write() exactly what you are looking for In order to change the start index you need only specify the second argument named offset and then the length to write.

If not... I guess I don't quite follow what you are asking. What about it doesn't do what you are looking for



 
 
Arkady Frenkel





PostPosted: Visual C# Language, copy buffer not from first element question Top

Yes, tnx, just forgot about second parameter as not 0 , shame on me

Arkady