CSharp examples for System:DateTime Month
Add Months
// (c) Copyright Microsoft Corporation. using System.Windows.Markup; using System.Windows; using System.Globalization; using System.Diagnostics; using System;//from w w w . j ava 2s. co m public class Main{ public static DateTime? AddMonths(DateTime time, int months) { try { return cal.AddMonths(time, months); } catch (System.ArgumentException) { return null; } } }