public int GetHashCode(XmlSchemaInfo si) { if (si == null) { return(0); } int h = (int)si.ContentType; if (si.IsDefault) { h ^= 1; } if (si.IsNil) { h ^= 1; } XmlSchemaSimpleType memberType = si.MemberType; if (memberType != null) { h ^= memberType.GetHashCode(); } XmlSchemaAttribute schemaAttribute = si.SchemaAttribute; if (schemaAttribute != null) { h ^= schemaAttribute.GetHashCode(); } XmlSchemaElement schemaElement = si.SchemaElement; if (schemaElement != null) { h ^= schemaElement.GetHashCode(); } XmlSchemaType schemaType = si.SchemaType; if (schemaType != null) { h ^= schemaType.GetHashCode(); } h ^= (int)si.Validity; return(h); }