I have a generic list of objects in C#, for example sake, here's what the object might be.
public class Thing {
public string Name { get; set; }
public DateTime EditDate { get; set; }
}
var things = new List<Thing>();
Now I want to call:
thing.Sort((t1, t2) => t1.EditDate.CompareTo(t2.EditDate));
However, some of my EditDate properties are null. I want these objects with a null EditDate property to show up at the top of my list (i.e. closer to the zero index). How can I do this?