Add a specified number of months to the current DateTimeOffset in CSharp
Description
The following code shows how to add a specified number of months to the current DateTimeOffset.
Example
using System;// ww w . j a v a2s . c om
public class MainClass{
public static void Main(String[] argv){
DateTimeOffset quarterDate = new DateTimeOffset(2014, 1, 1, 0, 0, 0,
DateTimeOffset.Now.Offset);
quarterDate = quarterDate.AddMonths(3);
Console.WriteLine(quarterDate);
}
}
The code above generates the following result.