I have a List
of objects which contain a string array as one of their properties. I want to get a distinct string array containing all the values.
My object looks like this:
public class Zoo {
string Name { get; set;}
string[] Animals { get; set;}
}
Some zoos may have only one animal, some may have many. What would be the simplest Lambda expression or LINQ query to get me a unique list of all animals at all the Zoos in List<Zoo>
?