Sort List<DateTime> Descending

Though it's untested...

docs.Sort((x, y) => y.StoredDate.CompareTo(x.StoredDate));

should be the opposite of what you originally had.


What's wrong with:

docs.OrderByDescending(d => d.StoredDate);

docs.Sort((x, y) => y.StoredDate.CompareTo(x.StoredDate));

Should do what you're looking for.


docs.Sort((x, y) => -x.StoredDate.CompareTo(y.StoredDate));

Note the minus sign.