日期:2014-05-18 浏览次数:20447 次
DateTime dt1= DateTime.Parse("2011-11-2"); DateTime dt2= DateTime.Parse("2011-10-1"); if(dt1.AddMonths(-1)>dt2) Console.WriteLine("more than one month"); else Console.WriteLine("less than one month");