I have a class called Person which contains a property LastName, which reflects a string cooresponding to the Person's last name.
I created a List as follows:
var People = List<Person>
What I would like to do is sort the people by their LastName property in alphabetical order.
After looking at some examples, I've tried
People = People.OrderBy(p => p.LastName);
But it does not work.
does not work. Is it a compilation error? or a runtime error? or unexpected results?, etc.