I need to get specific bytes from a byte array. I know the content of the first byte I want and I need x bytes after that.
For example, I have
byte [] readbuffer { 0, 1, 2, 0x55, 3, 4, 5, 6};
byte [] results = new byte[30];
and I need the 3 bytes that appear after "0x55"
byte results == {ox55aa, 3, 4, 5}
I'm using:
Array.copy(readbuffer, "need the index of 0x55" ,results, 0, 3);
I need to find the index of 0x55
PS: 0x55
is in an aleatory position in the array.
PS2: I forgot to mention before that I'm working in .Net Micro Framework.
(I'm sorry for the non code description, I'm a very newbie to programming... and english)
thank you in advance
[edited]x2