TimeSpan.Duration() : TimeSpan « System « C# / C Sharp by API






TimeSpan.Duration()

  

using System;

class MainClas
{
  public static void Main()
  {
    TimeSpan myTimeSpan13 = new TimeSpan(1, 10, 13);
    TimeSpan myTimeSpan14 = new TimeSpan(2, 6, 10);
    TimeSpan myTimeSpan15 = myTimeSpan13.Subtract(myTimeSpan14);
    
    Console.WriteLine("myTimeSpan15.Duration() = " + myTimeSpan15.Duration());

  }
}

   
    
  








Related examples in the same category

1.new TimeSpan(days, hours, minutes, seconds)
2.new TimeSpan(days, hours, minutes, seconds, milliseconds
3.new TimeSpan(ticks)
4.TimeSpan + TimeSpan
5.TimeSpan.Add(TimeSpan ts)
6.TimeSpan.FromDays
7.TimeSpan.Milliseconds
8.TimeSpan.Negate()
9.TimeSpan.Parse
10.TimeSpan.Subtract(TimeSpan ts)
11.TimeSpan.TicksPerDay
12.TimeSpan.TotalDays