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?
var designations = persons.Select(p => p.Designation).Distinct();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With