I have a list of trees
List<Tree> trees;
...
filter_trees = trees.Distinct().ToList();
I want to select distinct trees, it works based on equality function of Tree
class to distinguish distinct trees. Now I need to order these distinct trees based on their frequency (count) in the trees
.
It may need a group by
statement, however I prefer Distinct
as it has no argument and works based on the specific Equals
function I wrote.