public int Size()
{
// 7 indicates sizeof (byte) * 3 + sizeof (UInt16) * 2
int size = sizeof(byte) * 7;
for (int i = 0; i < this.HierarchyValueCount; i++)
{
if (this.HierarchyValues[i].Value != null)
{
size += this.HierarchyValues[i].Size();
}
}
for (int i = 0; i < this.PropertyValueCount; i++)
{
if (this.PropertyValues[i].Value != null)
{
size += this.PropertyValues[i].Size();
}
}
return size;
}
}