An universal extension method:
public static class EnumerableExtensions
{
public static IEnumerable DistinctBy(this IEnumerable enumerable, Func keySelector)
{
return enumerable.GroupBy(keySelector).Select(grp => grp.First());
}
}
Example of usage:
var lstDst = lst.DistinctBy(item => item.Key);