GetHashCode() private method

private GetHashCode ( ) : int
return int
示例#1
0
        public override int GetHashCode()
        {
            var constant = 37;
            var hash     = 17;

            if (parent == null)
            {
                hash += constant;
            }
            else
            {
                hash = hash * constant + parent.GetHashCode();
            }
            if (idText == null)
            {
                hash += constant;
            }
            else
            {
                hash = hash * constant + idText.GetHashCode();
            }
            return(hash);
        }