I have the following base classes (cut out for this question):
public class Parent { public string Name { get; set; } public IList<Child> Children { get; set; } } public class Child { public string Name { get; set; } }
If I have a parent collection, then I would like to get an IList that is sorted by Parent.Name, as well as children for each parent should be sorted by their name.
I tried this (which only sorts parents, not children):
IList<Parent> parents = ...
I searched but can't find anything (maybe I'm dumb).
Any suggestions for Linq newbies?
Thank you in advance
Andy
source share