Beispiel #1
0
 public override int GetHashCode()
 {
     unchecked
     {
         int hash = 17;
         // Suitable nullity checks etc, of course :)
         hash = hash * 23 + DepthCompareFunction.GetHashCode();
         hash = hash * 23 + DepthWriteEnabled.GetHashCode();
         hash = hash * 23 + Front.GetHashCode();
         hash = hash * 23 + Back.GetHashCode();
         return(hash);
     }
 }
Beispiel #2
0
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         // Suitable nullity checks etc, of course :)
         if (Front != null)
         {
             hashCode = hashCode * 59 + Front.GetHashCode();
         }
         if (Nutrition != null)
         {
             hashCode = hashCode * 59 + Nutrition.GetHashCode();
         }
         if (Ingredients != null)
         {
             hashCode = hashCode * 59 + Ingredients.GetHashCode();
         }
         return(hashCode);
     }
 }
Beispiel #3
0
 /// <summary>
 /// Return the HashCode of this object.
 /// </summary>
 /// <returns>The HashCode of this object.</returns>
 public override Int32 GetHashCode()
 {
     return(Left.GetHashCode() ^ 1 + Top.GetHashCode() ^ 2 + Front.GetHashCode() ^ 3 + Right.GetHashCode() ^ 4 + Bottom.GetHashCode() ^ 5 + Behind.GetHashCode());
 }
Beispiel #4
0
 /// <summary>
 /// Return the HashCode of this object.
 /// </summary>
 /// <returns>The HashCode of this object.</returns>
 public override Int32 GetHashCode()
 {
     return(Left.GetHashCode() ^ 1 + Top.GetHashCode() ^ 2 + Front.GetHashCode() ^ 3 + Radius.GetHashCode());
 }