Michel,
As Kevin indicated, a byte array is an array of bytes. You can choose which
element to start reading at and read as many elements as you wish just like
any other array.
I suspect you may be confusing this the the different datatypes that might
be serialized via a struct such as with LayoutKind.Sequential where the
number of bytes and type for each field in the struct is clearly demarcated.
Hope that helps.
Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
"Michel Racicot" wrote:
What is the best way to read datas in a byte[] that contains several
datatypes?
Some of the datas needs to be peeked before being read, so I can't use
anything that advances while reading without permitting peeking any number
of bytes first...
Normally, I would have used a StreamReader but it seems that it cannot peek
for more than 1 byte...
Any suggestions?