public int Size() { // 3 indicates sizeof (byte) + sizeof (UInt16) int size = sizeof(byte) * 3; size += this.MessageIdSize; return size; } }