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

GetHashCode() public method

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

Usage Example

コード例 #1
0
        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