public byte[] Serialize()
{
int index = 0;
byte[] serializeBuffer = new byte[this.Size()];
serializeBuffer[index++] = this.RopId;
serializeBuffer[index++] = this.LogonId;
serializeBuffer[index++] = this.InputHandleIndex;
Array.Copy(BitConverter.GetBytes((ushort)this.PropertyTagCount), 0, serializeBuffer, index, sizeof(ushort));
index += sizeof(ushort);
for (int i = 0; i < this.PropertyTagCount; i++)
{
Array.Copy(this.PropertyTags[i].Serialize(), 0, serializeBuffer, index, this.PropertyTags[i].Size());
index += this.PropertyTags[i].Size();
}
return serializeBuffer;
}