How to sort a list in C# with secondary sorting. For example if I have a class called Student with two fields FirstName and LastName. Until now I've sorted the list as follows:
MyStudents.Sort((s1, s2) => s1.LastName.CompareTo(s2.LastName));
I wanted to know how can I sort the list first by last name and then by first name. Thanks.