<p>How do I select the unique elements from the list <code>{0, 1, 2, 2, 2, 3, 4, 4, 5}</code> so that I get <code>{0, 1, 3, 5}</code>, effectively removing <em>all instances of</em> the repeated elements <code>{2, 4}</code>?</p>

```
```
var nums = new int{ 0...4,4,5};
var distinct = nums.Distinct();
```
```
make sure you're using Linq and .NET framework 3.5.