Example #1
0
 /// <inheritdoc/>
 public override int GetHashCode()
 {
     unchecked
     {
         return((Type1.GetHashCode() * 397) ^ Type2.GetHashCode());
     }
 }
Example #2
0
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = base.GetHashCode();
         hashCode = (hashCode * 397) ^ (Type1 != null ? Type1.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Type2 != null ? Type2.GetHashCode() : 0);
         return(hashCode);
     }
 }
 public override int GetHashCode()
 {
     return((Type1 == null ? 0 : Type1.GetHashCode())
            + (Type2 == null ? 0 : Type2.GetHashCode()));
 }
 public override int GetHashCode()
 {
     return((Type1?.GetHashCode() ?? 0) + (Type2?.GetHashCode() ?? 0));
 }
 /// <summary>
 /// Returns the hash code for this key.
 /// </summary>
 /// <returns>
 /// The hash code.
 /// </returns>
 public override int GetHashCode()
 {
     return(Type1.GetHashCode() ^ (Type2 ?? string.Empty).GetHashCode());
 }