コード例 #1
0
 public override bool Equals(object obj)
 {
     if (obj != null && obj is ControlValuePropertyAttribute)
     {
         ControlValuePropertyAttribute propAttrib = (ControlValuePropertyAttribute)obj;
         return(this.propertyName == propAttrib.propertyName &&
                this.propertyValue == propAttrib.propertyValue &&
                this.propertyType == propAttrib.propertyType);
     }
     return(false);
 }
コード例 #2
0
        public override bool Equals(object obj)
        {
            ControlValuePropertyAttribute attribute = obj as ControlValuePropertyAttribute;

            if ((attribute == null) || !string.Equals(this._name, attribute.Name, StringComparison.Ordinal))
            {
                return(false);
            }
            if (this._defaultValue != null)
            {
                return(this._defaultValue.Equals(attribute.DefaultValue));
            }
            return(attribute.DefaultValue == null);
        }
        public override bool Equals(object obj)
        {
            ControlValuePropertyAttribute other = obj as ControlValuePropertyAttribute;

            if (other != null)
            {
                if (String.Equals(_name, other.Name, StringComparison.Ordinal))
                {
                    if (_defaultValue != null)
                    {
                        return(_defaultValue.Equals(other.DefaultValue));
                    }
                    else
                    {
                        return(other.DefaultValue == null);
                    }
                }
            }
            return(false);
        }