System.ComponentModel.ToolboxItemAttribute.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;
            }

            ToolboxItemAttribute other = obj as ToolboxItemAttribute;
            return (other != null) && (other.ToolboxItemTypeName == ToolboxItemTypeName);
        }

Usage Example

Example #1
0
 public void Equals_Other_ReturnsExpected(ToolboxItemAttribute attribute, object other, bool expected)
 {
     Assert.Equal(expected, attribute.Equals(other));
     if (other is ToolboxItemAttribute)
     {
         Assert.Equal(expected, attribute.GetHashCode().Equals(other.GetHashCode()));
     }
 }