12 public static int Combine(
int first,
int second)
15 return (((first << 5) + first) ^ second);
20 public static int FromNullable<T1>(T1 toHash)
22 return (toHash == null)
24 : toHash.GetHashCode();
27 public static int Combine<T1, T2>(T1 first, T2 second)
29 return Combine(FromNullable(first), FromNullable(second));
32 public static int Combine<T1, T2, T3>(T1 first, T2 second, T3 third)
34 return Combine(Combine(first, second), FromNullable(third));
37 public static int Combine<T1, T2, T3, T4>(T1 first, T2 second, T3 third, T4 fourth)
39 return Combine(Combine(first, second, third), FromNullable(fourth));
42 public static int Combine<T1, T2, T3, T4, T5>(T1 first, T2 second, T3 third, T4 fourth, T5 fifth)
44 return Combine(Combine(first, second, third, fourth), FromNullable(fifth));
47 public static int Combine<T1, T2, T3, T4, T5, T6>(T1 first, T2 second, T3 third, T4 fourth, T5 fifth, T6 sixth)
49 return Combine(Combine(first, second, third, fourth, fifth), FromNullable(sixth));
52 public static int Combine<T1, T2, T3, T4, T5, T6, T7>(T1 first, T2 second, T3 third, T4 fourth, T5 fifth, T6 sixth, T7 seventh)
54 return Combine(Combine(first, second, third, fourth, fifth, sixth), FromNullable(seventh));
57 public static int Combine<T1, T2, T3, T4, T5, T6, T7, T8>(T1 first, T2 second, T3 third, T4 fourth, T5 fifth, T6 sixth, T7 seventh, T8 eighth)
59 return Combine(Combine(first, second, third, fourth, fifth, sixth, seventh), FromNullable(eighth));