I'm looking to cache objects whose uniqueness is determined by a combination of all properties within that object. The object I have is something like this:
public double A { get; set; }
public double B { get; set; }
public short C { get; set; }
public bool D { get; set; }
public double E { get; set; }
public double F { get; set; }
public double G { get; set; }
public double H { get; set; }
public double J { get; set; }
public double K { get; set; }
public double[] L { get; set; }
public double[] M { get; set; }
I could overwrite GetHashCode
and do something like return A ^ B ^ C etc...
However, I'm concerned that I will have many collisions.
What would be the best way to cache an object such as this?