System.ComponentModel.ProvidePropertyAttribute.GetHashCode C# (CSharp) 메소드

GetHashCode() 공개 메소드

public GetHashCode ( ) : int
리턴 int
        public override int GetHashCode() {
            return propertyName.GetHashCode() ^ receiverTypeName.GetHashCode();
        }
    }

Usage Example

        public void GetHashCode_NullPropertyName_ReturnsEqual()
        {
            var attribute = new ProvidePropertyAttribute(null, "receiverTypeName");

            if (!PlatformDetection.IsFullFramework)
            {
                Assert.Equal(attribute.GetHashCode(), attribute.GetHashCode());
            }
            else
            {
                Assert.Throws <NullReferenceException>(() => attribute.GetHashCode());
            }
        }
All Usage Examples Of System.ComponentModel.ProvidePropertyAttribute::GetHashCode