I have a class that contains the following two properties:
public int Id { get; private set; } public T[] Values { get; private set; }
I would do it this way:
long result = Id.GetHashCode(); foreach(T val in Values) result ^= val.GetHashCode(); return result;