private int getValueByteSize(bool recalc) { if (recalc) { m_ValueByteSize = 4 + //underlying document int32 size 1; //underlying document terminator for (int i = 0; i < Value.Length; i++) { m_ValueByteSize += 1 + //type BinUtils.GetIntDigitCount(i) + //name as UTF8 string size 1 + //string terminator Value[i].GetValueByteSize(); } } return(m_ValueByteSize); }