Given this class:
public class Parent
{
public Child[] Children {get;set;}
}
And this array:
Parent[] parents;
How can I retrieve all the children from the parents array using Linq or something else? This seems bad:
IList<Child> children = new List<Child>();
foreach(var parent in parents)
children.AddRange(parent.Children);
Or is that not so bad? :-)