コード例 #1
0
        public override int GetHashCode()
        {
            unchecked {
                int hash = 17;

                hash = hash * 29 + Pointer.GetHashCode();
                return(hash);
            }
        }
コード例 #2
0
        public override int GetHashCode()
        {
            unchecked {
                int hash = 17;

                hash = hash * 29 + Preference.GetHashCode();
                hash = hash * 29 + Mailserver.GetHashCode();
                return(hash);
            }
        }
コード例 #3
0
ファイル: DNSPacket.cs プロジェクト: adamnew123456/DNS
 public override int GetHashCode()
 {
     // See SO:
     // http://stackoverflow.com/questions/263400/what-is-the-best-algorithm-for-an-overridden-system-object-gethashcode
     unchecked
     {
         int hash = 17;
         hash = hash * 29 + Name.GetHashCode();
         hash = hash * 29 + (int)raw_query_type;
         hash = hash * 29 + (int)raw_address_class;
         return(hash);
     }
 }
コード例 #4
0
        public override int GetHashCode()
        {
            unchecked {
                int hash = 17;

                hash = hash * 29 + PrimaryNameServer.GetHashCode();
                hash = hash * 29 + Hostmaster.GetHashCode();
                hash = hash * 29 + Serial.GetHashCode();
                hash = hash * 29 + RefreshSeconds.GetHashCode();
                hash = hash * 29 + RetrySeconds.GetHashCode();
                hash = hash * 29 + ExpireSeconds.GetHashCode();
                hash = hash * 29 + MinimumTTL.GetHashCode();
                return(hash);
            }
        }
コード例 #5
0
ファイル: ResourceRecord.cs プロジェクト: adamnew123456/DNS
 public override int GetHashCode()
 {
     // See SO:
     // http://stackoverflow.com/questions/263400/what-is-the-best-algorithm-for-an-overridden-system-object-gethashcode
     unchecked {
         int hash = 17;
         hash = hash * 29 + Name.GetHashCode();
         hash = hash * 29 + (int)AddressClass;
         hash = hash * 29 + (int)TimeToLive;
         if (Resource != null)
         {
             hash = hash * 29 + Resource.GetHashCode();
         }
         return(hash);
     }
 }