Add a specified number of whole and fractional days to the current DateTimeOffset in CSharp
Description
The following code shows how to add a specified number of whole and fractional days to the current DateTimeOffset.
Example
using System;//w ww . j av a 2 s . co m
public class MainClass{
public static void Main(String[] argv){
DateTimeOffset workDay = new DateTimeOffset(2014, 3, 1, 9, 0, 0,
DateTimeOffset.Now.Offset);
workDay = workDay.AddDays(1);
Console.WriteLine(" {0:dddd}, {0:MMMM}{0: d}", workDay);
}
}
The code above generates the following result.