new TimeSpan(days, hours, minutes, seconds) : TimeSpan « System « C# / C Sharp by API






new TimeSpan(days, hours, minutes, seconds)

  

using System;

class MainClas
{
  public static void Main()
  {
    
    int hours = 4;
    int minutes = 12;
    int seconds = 10;
    int days = 1;
    TimeSpan myTimeSpan2 = new TimeSpan(days, hours, minutes, seconds);
    Console.WriteLine("myTimeSpan2 = " + myTimeSpan2);
  }
}

   
    
  








Related examples in the same category

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