System.ComponentModel.ToolboxItemAttribute.Equals C# (CSharp) 메소드

Equals() 공개 메소드

public Equals ( object obj ) : bool
obj object
리턴 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

예제 #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()));
     }
 }