I have an object called simulation results.
public SimulationResult
{
public Horse Winner {get;set;}
public Horse Second {get;set;}
public Horse Third {get;set;}
public Horse Fourth {get;set;}
}
public Horse
{
public Guid Id{get;set;}
}
So, I have a list of 50000 SimulationResult. How can I determine the top 50 most common results.
I tried using LINQ groupBy but the horseId appears in each object and it doesn't allow multiple occurrences of one value.
EDIT Sorry, thought it was clear. So we have 8 horses total. Say horse id is 1-8.
So in simulation result 1 the winner is 1, second is 2, third is 3, fourth is 4.
In simulation result 2 first is 5, second is 6 , third is 7, fourth is 8.
In simulation result 3 first is 1, second is 2, third is 3, fourth is 4.
So result set 1 and result set 3 are equal. So in this sample, winner 1 second 2 third 3 fourth 4 is the most common result.