public int Size() { // 7 indicates sizeof (byte) * 3 + sizeof (UInt32) int size = sizeof(byte) * 7; if (this.StreamDataSize > 0) { size += (int)this.StreamDataSize; } return size; } }