internal object[] GetPseudoCustomAttributes () { int count = 0; /* IsSerializable returns true for delegates/enums as well */ if ((Attributes & TypeAttributes.Serializable) != 0) count ++; if ((Attributes & TypeAttributes.Import) != 0) count ++; if (count == 0) return null; object[] attrs = new object [count]; count = 0; if ((Attributes & TypeAttributes.Serializable) != 0) attrs [count ++] = new SerializableAttribute (); if ((Attributes & TypeAttributes.Import) != 0) attrs [count ++] = new ComImportAttribute (); return attrs; }