TimeSpan

TimeSpan


This class represents an amount of time.


Remarks

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.

See Also

Project VBCorLib Overview | Constructors | TimeSpanStatic | cDateTime

Implements:

IComparable 
IObject 

Public:

Properties:

NameDescription
 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. 

Methods:

NameDescription
 AddAdds a timespan to this instance. 
 CompareToCompares this TimeSpan with another timespan. 
 DurationReturns the absolute value of this instance. 
 EqualsReturns a boolean indicating if the value and this TimeSpan instance are the same value. 
 EqualTo 
 GetHashCodeReturns a pseudo-unique number identifying this instance. 
 GreaterThanReturns if this TimeSpan instance is greater than another TimeSpan instance. 
 GreaterThanOrEqualTo 
 LessThan 
 LessThanOrEqualTo 
 NegateReturns a TimeSpan with the opposite sign of this instance. 
 NotEqualTo 
 SubtractSubtracts a timespan from this instance. 
 ToStringReturns a string representation of the duration.