copy buffer not from first element question

A

Arkady Frenkel

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
 
M

Marc Gravell

Do you mean you have a byte array, and you want to copy e.g. bytes
27,28,29,...300?

So call stream.Write(array, offset i, bytes to write);

the second parameter is the offset to start copying (in the byte array
in the first param), and the third parameter is the number of bytes to
write.

Marc
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top