private static StreamToWord ( byte data, int &offset ) : uint | ||
data | byte | The string to extract the data from. |
offset | int | [in,out] The current offset. |
리턴 | uint |
private static uint StreamToWord(byte[] data, ref int offset)
{
int i;
uint word = 0;
for (i = 0; i < 4; i++)
{
word = (word << 8) | (uint)(data[offset] & 0xff);
offset = (offset + 1) % data.Length;
}
return word;
}