TimeSpan |
IComparable | |
IFormattable | |
IObject |
Name | Description |
---|---|
Days (get) | Returns the Days portion of the duration. |
Hours (get) | Returns the Hours portion of the duration. |
Milliseconds (get) | Returns the Milliseconds portion of the duration. |
Minutes (get) | Returns the Minutes portion of the duration. |
Seconds (get) | Returns the Seconds portion of the duration. |
Ticks (get) | Returns the duration in ticks. |
TotalDays (get) | Returns the duration of this instance in days. |
TotalHours (get) | Returns the duration of this instance in hours. |
TotalMilliseconds (get) | Returns the duration of this instance in milliseconds. |
TotalMinutes (get) | Returns the duration of this instance in minutes. |
TotalSeconds (get) | Returns the duration of this instance in seconds. |
Name | Description |
---|---|
Add | Adds a timespan to this instance. |
CompareTo | Compares this TimeSpan with another timespan. |
Duration | Returns the absolute value of this instance. |
Equals | Returns a boolean indicating if the value and this TimeSpan instance are the same value. |
GetHashCode | Returns a pseudo-unique number identifying this instance. |
Negate | Returns a TimeSpan with the opposite sign of this instance. |
Subtract | Subtracts a timespan from this instance. |
ToString | Converts the value of the current TimeSpan object to its equivalent string representation by using the specified format and culture-specific formatting information. |
The time is represented internally in milliseconds, with a fractional portion to represent ticks. A tick is defined as 100 nanoseconds, or 1/10000 of a millisecond. TimeSpans are displayed in a [-][d.]hh:mm:ss[.ff] format. Bracketed fields are only displayed if they are not zero. A negative sign is displayed if the timespan is negative.