C# program to demonstrate the use of FromDays() method of TimeSpan structure
using System;
class TimeSpanDemo
{
//Entry point of Program
static public void Main()
{
TimeSpan timespan = TimeSpan.FromDays(28.999888);
Console.WriteLine("timespan accurate to nearest millisecond: "+timespan);
}
}
Output
timespan accurate to nearest millisecond: 28.23:59:50.3230000
Press any key to continue . . .
Table of Contents