Gets the value of the current instance expressed in days.
A double that specifies the total number of days represented by the current instance.
This property is read-only.
Note: This property converts the value of the current instance from ticks to days. This number can include whole and fractional 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
TotalDays: 11.5740740740741
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0