public int Size() { // 10 indicates sizeof(byte) * 4 + sizeof(ushort) * 3 int size = sizeof(byte) * 10; for (int i = 0; i < this.SortOrderCount; i++) { size += this.SortOrders[i].Size(); } return size; } }