Monday, April 23, 2012

Collection<Collection<Person>> to Collection<Person> in one linq statment

i have List> i want it to copy all people in the previous collection to List collection.



i did it like:



        var people = new List<Person>();
People.ForEach(q => people.AddRange(q.People));
return people;


is there any better way to do this?





No comments:

Post a Comment