Add two TimeSpan in CSharp
Description
The following code shows how to add two TimeSpan.
Example
// w ww . j av a2 s . co m
using System;
public class Example
{
public static void Main()
{
TimeSpan baseTimeSpan = new TimeSpan(1, 12, 15, 16);
TimeSpan interval = TimeSpan.FromDays(1.5);
baseTimeSpan.Add(interval);
Console.WriteLine(baseTimeSpan.Ticks);
}
}
The code above generates the following result.