parse array

  • Thread starter Thread starter Rustam Asgarov
  • Start date Start date
R

Rustam Asgarov

i have an aray of bites
" private byte[] ByteArray = new byte[4000]; "
How can i parse this array to read integers, in other words
assign first 4 bytes to one integer variable, second 4 bytes to another
itneger variable and so on...

Thanks...
 
i have an aray of bites
" private byte[] ByteArray = new byte[4000]; "
How can i parse this array to read integers, in other words
assign first 4 bytes to one integer variable, second 4 bytes to another
itneger variable and so on...

Use Buffer.BlockCopy() to copy it all over to an int[], or use
BitConverter.ToInt32() to read one int at the time.



Mattias
 

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

Back
Top