TimeSpan Methods

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

The TimeSpan type exposes the following members.

  Name Description
Public method Add Returns a new TimeSpan object whose value is the sum of the specified TimeSpan object and this instance.
Public method Static member Compare Compares two TimeSpan values and returns an integer that indicates whether the first value is shorter than, equal to, or longer than the second value.
Public method CompareTo Compares this instance to a specified object and returns an integer that indicates whether this instance is shorter than, equal to, or longer than the specified object.
Public method Duration Returns a new TimeSpan object whose value is the absolute value of the current TimeSpan object.
Public method Equals(Object) Returns a value indicating whether this instance is equal to a specified object. (Overrides ValueType..::..Equals(Object).)
Public method Static member Equals(TimeSpan, TimeSpan) Returns a value that indicates whether two specified instances of TimeSpan are equal.
Public method Static member FromTicks Returns a TimeSpan that represents a specified time, where the specification is in units of ticks.
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method Negate Returns a new TimeSpan object whose value is the negated value of this instance.
Public method Subtract Returns a new TimeSpan object whose value is the difference between the specified TimeSpan object and this instance.
Public method ToString Converts the value of the current TimeSpan object to its equivalent string representation. (Overrides Object..::..ToString()()()().)
Top
Show: