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