コード例 #1
0
 /// <inheritdoc/>
 public override int GetHashCode()
 {
     unchecked
     {
         return((SubnetId.GetHashCode() * 397) ^ (IPAddress != null ? IPAddress.GetHashCode() : 0));
     }
 }
コード例 #2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (SubnetId.Length != 0)
            {
                hash ^= SubnetId.GetHashCode();
            }
            if (Address.Length != 0)
            {
                hash ^= Address.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }