new TimeSpan(days, hours, minutes, seconds, milliseconds
using System;
class MainClas
{
public static void Main()
{
int hours = 4;
int minutes = 12;
int seconds = 10;
int days = 1;
int milliseconds = 20;
TimeSpan myTimeSpan3 = new TimeSpan(days, hours, minutes, seconds, milliseconds);
Console.WriteLine("myTimeSpan3 = " + myTimeSpan3);
}
}
Related examples in the same category