System.ComponentModel.DefaultBindingPropertyAttribute.Equals C# (CSharp) Method

Equals() public method

public Equals ( object obj ) : bool
obj object
return bool
        public override bool Equals(object obj) {
            DefaultBindingPropertyAttribute other = obj as DefaultBindingPropertyAttribute; 
            return other != null && other.Name == name;
        }

Usage Example

		public void EqualsTest ()
		{
			DefaultBindingPropertyAttribute a;

			a = new DefaultBindingPropertyAttribute ("test");
			Assert.IsFalse (a.Equals (null), "1");
			Assert.IsFalse (a.Equals (new DefaultBindingPropertyAttribute ("other")), "2");
			Assert.IsFalse (a.Equals (new DefaultBindingPropertyAttribute ("Test")), "3");
			Assert.IsTrue (a.Equals (new DefaultBindingPropertyAttribute ("test")), "4");
		}