Create TimeSpan to a specified number of days, hours, minutes, and seconds in CSharp
Description
The following code shows how to create TimeSpan to a specified number of days, hours, minutes, and seconds.
Example
using System;/*w w w . j a v a 2 s . co m*/
class Example
{
static void Main( )
{
TimeSpan elapsedTime = new TimeSpan( 10, 20, 30, 40 );
Console.WriteLine(elapsedTime.Ticks );
}
}
The code above generates the following result.