Retrieve an array of a property from an array of objects

Viewed 11722

Assume the following class:

class Person
{
   public string FirstName {get;set;}
   public string LastName {get;set;}
}

Lets say that I have a list or an array of Person object. Is there a way using LINQ to retrieve FirstName property from all the array elements and return an array of string. I have a feeling that I have seen something like that before.

Hope that the question makes sense.

3 Answers
Related