<p>I have a generic list of objects in C#, for example sake, here's what the object might be.</p>

<pre><code>public class Thing {
    public string Name { get; set; }
    public DateTime EditDate { get; set; }
}

var things = new List&lt;Thing&gt;();
</code></pre>

<p>Now I want to call:</p>

<pre><code>thing.Sort((t1, t2) =&gt; t1.EditDate.CompareTo(t2.EditDate));
</code></pre>

<p>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?</p>

List has a
sort function
that takes a delegate.
Now that I've read the question
```
```
TheList.Sort(int delegate(Type a, Type b)
{
    if (a.memeber == null) return -1;
    if (b.memeber == null) return 1;
    if (a.memeber<b.memeber) return -1;
    if (b.memeber<a.memeber) return 1;
    return 0;
}
```
```