TimeSpan::TotalHours Property
Gets the value of the current TimeSpan structure expressed in whole and fractional hours.
Assembly: mscorlib (in mscorlib.dll)
This property converts the value of this instance from ticks to hours. This number might include whole and fractional hours.
The TotalHours property represents whole and fractional hours, whereas the Hours property represents whole hours.
The following example instantiates a TimeSpan object and displays the value its TotalHours property. It also displays the value of each component (hours, minutes, seconds, and milliseconds) that forms the fractional part of the value of its TotalHours property.
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1