var a = new double[] {1, 2, 3};
var b = new double[] {1, 2, 3};
System.Console.WriteLine(Equals(a, b)); // Returns false
However, I'm looking for a way to compare arrays which would compare the internal values instead of refernces. Is there a built in way to do this in .NET?
Also, while I understand Equals
comparing references, GetHashCode
returns different values for these two arrays also, which I feel shouldn't happen, since they have the same internal values.