Get the distinct items from an IEnumerable<T>

asp.net, linq

Solution

var designations = persons.Select(p => p.Designation).Distinct();

Problem

I have an `IEnumerable<Person>` object. The `Person` class has a `Designation` property. I want to select distinct `Designation` values from `IEnumerable<Person>` and assign that to a DropDownList. How can I do it?

Original source