コード例 #1
0
ファイル: Complex.cs プロジェクト: isukces/cs2python
 public override int GetHashCode()
 {
     unchecked
     {
         return((Re.GetHashCode() * 397) ^ Im.GetHashCode());
     }
 }
コード例 #2
0
        public override int GetHashCode()
        {
            int hash = 371;

            hash += 117 * Re.GetHashCode() + 23 * Im.GetHashCode();
            return(hash);
        }
コード例 #3
0
 public override int GetHashCode()
 {
     // Don't ask me why shift 2,not anything else!
     // I found this practice on various Codes including
     // official documentations so used this
     return((Re.GetHashCode() << 2) ^ Im.GetHashCode());
 }
コード例 #4
0
 public override int GetHashCode()
 {
     unchecked
     {
         return(Im.GetHashCode() * 16777619 + Re.GetHashCode());
     }
 }
コード例 #5
0
        public override int GetHashCode()
        {
            var hashCode = 29377563;

            hashCode = hashCode * -1521134295 + Re.GetHashCode();
            hashCode = hashCode * -1521134295 + Im.GetHashCode();
            return(hashCode);
        }
コード例 #6
0
 public override int GetHashCode()
 {
     unchecked
     {
         // ReSharper disable once NonReadonlyMemberInGetHashCode
         return((Re.GetHashCode() * 397) ^ Im.GetHashCode());
     }
 }
コード例 #7
0
ファイル: Complex.cs プロジェクト: Evilpaul/CANoeCamera
 /// <summary>
 /// Returns the hashcode for this instance.
 /// </summary>
 ///
 /// <returns>A 32-bit signed integer hash code.</returns>
 public override int GetHashCode()
 {
     return(Re.GetHashCode() ^ Im.GetHashCode());
 }
コード例 #8
0
 // GetHashCode.
 public override int GetHashCode()
 {
     return(Re.GetHashCode() ^ (Re + Im).GetHashCode());
 }
コード例 #9
0
 public override int GetHashCode()
 {
     return(Re.GetHashCode() ^ (Im.GetHashCode() >> 16));
 }