LINQ find duplicates in List c# and get count code example
Example: find duplicates in lists with LINQ and get count
var query = lst.GroupBy(x => x)
.Where(g => g.Count() > 1)
.Select(y => new { Element = y.Key, Counter = y.Count() })
.ToList();