Gets the value of the current TimeSpan structure expressed in whole and fractional days.
A double that specifies the total number of days represented by the current instance.
This property converts the value of this instance from ticks to days. This number might include whole and fractional days.
The TimeSpan.TotalDays property represents whole and fractional days, whereas the TimeSpan.Days property represents whole days.
This example demonstrates using the TimeSpan.TotalDays property.
C# Example
using System; public class TimeSpanTotalUnitsProperties{ public static void Main() { TimeSpan ts = new TimeSpan((Int64)10e12); Console.WriteLine(ts.ToString()); Console.WriteLine("TotalDays: {0}", ts.TotalDays); } }
The output is
11.13:46:40