I believe that this is similar to this but I was not able to apply the same solution.
I have a list with several columns:
public struct InfoForGraph
{
public float a{ get; set; }
public double b{ get; set; }
public double c { get; set; }
public double 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 i { get; set; }
public double j { get; set; }
}
I would like to remove duplicate lines from this list but only if specific fields match. If I do a distinct with the whole table, these lines will not be erased. Also, I don't care with the repeated lines, I just wanna keep one of them.
Input:
2.67|1.84|420|400|1608039|808|3117|1|2|3|4
2.68|1.84|420|401|1608039|808|3269|1|2|3|4
Output expected:
2.67|1.84|420|400|1608039|808|3117|1|2|3|4
So, if columns 1,2,5,6,8,9,10 have the same value, I should keep only the first return (deleting the 2nd, 3rd, where all these fields match.)
Any ideas?