Add 2 month to the date time
using System;
using System.Collections.Generic;
using System.Text;
class Program {
static void Main(string[] args) {
DateTime dt = new DateTime(2004, 10, 17);
dt.AddMonths(2); // Month is now December.
Console.WriteLine("Daylight savings: {0}", dt.IsDaylightSavingTime());
}
}
Related examples in the same category