Select only the lowest values with Linq

Viewed 39456

Hi I got the following linq for ordering my input after lowest value. But i would like it to only output the lowest values.

var sortedDict = (from entry in x where entry.Value > 0 orderby entry.Value ascending select entry);

Now if it gets the following input.

3  4  2  6  2

This would be my output

2  2  3  4  6

What do I need to change in my linq so I only get this output

2  2
3 Answers
Related