public Deserialize ( byte buffer, int offset, int length ) : int | ||
buffer | byte | The buffer to deserialize from |
offset | int | The offset to begin deserializing |
length | int | |
Результат | int |
public int Deserialize(byte[] buffer, int offset, int length)
{
int count = (length - offset) / 2;
if(count > 0)
{
Networks = new ushort[count];
for(int i = 0; i < count; i++)
{
Networks[i] = buffer.ReadUInt16(offset);
offset += 2;
}
}
else
{
Networks = null;
}
return offset;
}