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