System.ComponentModel.PropertyDescriptor.GetHashCode C# (CSharp) Method

GetHashCode() public method

Try to keep this reasonable in [....] with Equals(). Specifically, if A.Equals(B) returns true, A & B should have the same hash code.
public GetHashCode ( ) : int
return int
        public override int GetHashCode()
        {
            return NameHashCode ^ PropertyType.GetHashCode();
        }

Usage Example

            public ValueTableKey(object item, PropertyDescriptor pd)
            {
                Invariant.Assert(item != null && pd != null);

                // store weak references to item and pd, so as not to affect their
                // GC behavior.  But remember their hashcode.
                _item = new WeakReference(item);
                _descriptor = new WeakReference(pd);
                _hashCode = unchecked(item.GetHashCode() + pd.GetHashCode());
            }
All Usage Examples Of System.ComponentModel.PropertyDescriptor::GetHashCode