public override bool Equals(object other) { if (!(other is TypecodeForTypeKey)) { return(false); } return(m_type.Equals(((TypecodeForTypeKey)other).m_type) && m_attributes.Equals(((TypecodeForTypeKey)other).m_attributes)); }
public void TestCollectionEqualsNotEqual() { TestAttributeForCollT1 a1 = new TestAttributeForCollT1(1); TestAttributeForCollT2 a2 = new TestAttributeForCollT2(2); TestAttributeForCollT3 a3 = new TestAttributeForCollT3(3); AttributeExtCollection c1 = new AttributeExtCollection(new Attribute[] { a1, a2, a3 }); AttributeExtCollection c2 = new AttributeExtCollection(new Attribute[] { a3, a2 }); Assert.IsTrue(!c1.Equals(c2), "collection equality"); }