using System;
using System.Globalization;
class MainClass {
public static void Main() {
// Create some date/time objects
DateTime dt = new DateTime();
DateTime dt1 = new DateTime(2001, 12, 31);
DateTime dt2 = new DateTime(2000, 12, 31, 23, 59, 59);
if (dt2 < dt1)
Console.WriteLine("Dt2 < Dt1");
else
if (dt2 == dt1)
Console.WriteLine("Dt2 == Dt1");
else
Console.WriteLine("Dt2 > Dt1");
}
}
|