private static GetBytes ( byte buffer, int &index, int count ) : byte[] | ||
buffer | byte | the buffer stores the value. |
index | int | the index of start to parse |
count | int | count of bytes |
return | byte[] |
private static byte[] GetBytes(byte[] buffer, ref int index, int count)
{
byte[] byteReturn = null;
if (count > 0)
{
byteReturn = new byte[count];
Array.Copy(buffer, index, byteReturn, 0, byteReturn.Length);
index += byteReturn.Length;
}
return byteReturn;
}