C#: How to convert a list of objects to a list of a single property of that object?

Solution 1:

List<string> firstNames = people.Select(person => person.FirstName).ToList();

And with sorting

List<string> orderedNames = people.Select(person => person.FirstName).OrderBy(name => name).ToList();

Solution 2:

IList<string> firstNames = (from person in people select person.FirstName).ToList();

Or

IList<string> firstNames = people.Select(person => person.FirstName).ToList();

Solution 3:

firstNames = (from p in people select p=>p.firstName).ToList();