代码
internal class Program{static void Main(string[] args){List<DateTime?> dateTimes = new List<DateTime?> { null,DateTime.MinValue,DateTime.MaxValue};var temp = new List<DateTime?> { };dateTimes.Sort();//dateTimes.Reverse();foreach (var dateTime in dateTimes){Console.WriteLine(dateTime);}Console.ReadLine();}}