Add a specified number of whole and fractional minutes to the current DateTimeOffset in CSharp
Description
The following code shows how to add a specified number of whole and fractional minutes to the current DateTimeOffset.
Example
using System;/*from w w w . j a v a 2 s. c om*/
public class MainClass{
public static void Main(String[] argv){
DateTimeOffset startTime = new DateTimeOffset(2014, 8, 6, 0, 0, 0,
DateTimeOffset.Now.Offset);
DateTimeOffset startOfShift = startTime.AddMinutes(8);
Console.WriteLine("Shifts for the week of {0:D}", startOfShift);
}
}
The code above generates the following result.