C#时间进行比较
DateTime t1 = new DateTime(100); DateTime t2 = new DateTime(20); //t1比t2大 if (DateTime.Compare(t1, t2) > 0) Console.WriteLine("t1 > t2");
//t1和t2相等 if (DateTime.Compare(t1, t2) == 0) Console.WriteLine("t1 == t2");
//t1比t2小 if (DateTime.Compare(t1, t2) < 0) Console.WriteLine("t1 < t2");