Create TimeSpan from a specified number of days in CSharp
Description
The following code shows how to create TimeSpan from a specified number of days.
Example
//from w w w . j a v a 2 s . c om
using System;
class FromDaysDemo
{
static void Main( )
{
TimeSpan interval = TimeSpan.FromDays( 0.000123456 );
string timeInterval = interval.ToString( );
Console.WriteLine( timeInterval );
}
}
The code above generates the following result.