I am trying to copy an array to another one that only copies what is distinct. I had this working before I was doing a multi dim array. Now when I run the following code it just copies the original array to the second array. I also need to keep them in an array format as I output the data on a webpage later on. What am I doing wrong or can I not do this with multi dim?
array2 = array.Distinct().ToArray();
string table = File.ReadAllLines(@path)
.Select(line => line.Split(';'))
For the sake of simplicity. Why not use this (apply distinct on line level):
string table = File.ReadAllLines(@path) .Distinct() .Select(line => line.Split(';')) .ToArray();
The assumption is here, that equal lines lead to the same array. That means, the order is a component in the definition of equality of two different lines.