Compares this to another to see if they are equivalent. NOTE: If you make a change here, you likely need to change GetHashCode() as well.
// Determine if two objects are equal. public override bool Equals(Object obj) { ExtenderProvidedPropertyAttribute other; other = (obj as ExtenderProvidedPropertyAttribute); if (other != null) { if (extenderProperty != null) { if (!extenderProperty.Equals(other.extenderProperty)) { return(false); } } else if (other.extenderProperty != null) { return(false); } if (provider != null) { if (!provider.Equals(other.provider)) { return(false); } } else if (other.provider != null) { return(false); } if (receiverType != null) { if (!receiverType.Equals(other.receiverType)) { return(false); } } else if (other.receiverType != null) { return(false); } return(true); } else { return(false); } }
public DataGridColumnStyle this[PropertyDescriptor propertyDesciptor] { get { int count = this.items.Count; for (int i = 0; i < count; i++) { DataGridColumnStyle style = (DataGridColumnStyle) this.items[i]; if (propertyDesciptor.Equals(style.PropertyDescriptor)) { return style; } } return null; } }
public DataGridColumnStyle this[PropertyDescriptor propertyDesciptor] { [ System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly") // already shipped ] get { int itemCount = items.Count; for (int i = 0; i < itemCount; ++i) { DataGridColumnStyle column = (DataGridColumnStyle)items[i]; if (propertyDesciptor.Equals(column.PropertyDescriptor)) return column; } return null; } }