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

Equals() public method

public Equals ( object obj ) : bool
obj object
return bool
        public override bool Equals(object obj) {
            if (obj == this) {
                return true;
            }

            ProvidePropertyAttribute other = obj as ProvidePropertyAttribute;

            return (other != null) && other.propertyName == propertyName && other.receiverTypeName == receiverTypeName;
        }

Usage Example

 public void Equals_Other_ReturnsExpected(ProvidePropertyAttribute attribute, object other, bool expected)
 {
     Assert.Equal(expected, attribute.Equals(other));
     if (other is DesignerAttribute)
     {
         Assert.Equal(expected, attribute.GetHashCode().Equals(other.GetHashCode()));
     }
 }
All Usage Examples Of System.ComponentModel.ProvidePropertyAttribute::Equals