public static int SizeOf(ISerializable obj) { const int bNotNull = sizeof(bool); return(obj != null ? bNotNull + obj.SizeOf() : bNotNull); }