using System; public class DateTimeComparison { public static void Main() { DateTime thisDate = DateTime.Today; DateTime thisDateNextYear, thisDateLastYear; thisDateNextYear = thisDate.AddYears(1); thisDateLastYear = thisDate.AddYears(-1); int r = thisDate.CompareTo(thisDateLastYear); Console.WriteLine(r); } }