TimeSpan Methods

TimeSpan Methods

 

Namespace:   System
Assembly:  mscorlib (in mscorlib.dll)

NameDescription
System_CAPS_pubmethodAdd(TimeSpan)

Returns a new TimeSpan object whose value is the sum of the specified TimeSpan object and this instance.

System_CAPS_pubmethodSystem_CAPS_staticCompare(TimeSpan, TimeSpan)

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.

System_CAPS_pubmethodCompareTo(Object)

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.

System_CAPS_pubmethodCompareTo(TimeSpan)

Compares this instance to a specified TimeSpan object and returns an integer that indicates whether this instance is shorter than, equal to, or longer than the TimeSpan object.

System_CAPS_pubmethodDuration()

Returns a new TimeSpan object whose value is the absolute value of the current TimeSpan object.

System_CAPS_pubmethodEquals(Object)

Returns a value indicating whether this instance is equal to a specified object.(Overrides ValueType.Equals(Object).)

System_CAPS_pubmethodEquals(TimeSpan)

Returns a value indicating whether this instance is equal to a specified TimeSpan object.

System_CAPS_pubmethodSystem_CAPS_staticEquals(TimeSpan, TimeSpan)

Returns a value that indicates whether two specified instances of TimeSpan are equal.

System_CAPS_pubmethodSystem_CAPS_staticFromDays(Double)

Returns a TimeSpan that represents a specified number of days, where the specification is accurate to the nearest millisecond.

System_CAPS_pubmethodSystem_CAPS_staticFromHours(Double)

Returns a TimeSpan that represents a specified number of hours, where the specification is accurate to the nearest millisecond.

System_CAPS_pubmethodSystem_CAPS_staticFromMilliseconds(Double)

Returns a TimeSpan that represents a specified number of milliseconds.

System_CAPS_pubmethodSystem_CAPS_staticFromMinutes(Double)

Returns a TimeSpan that represents a specified number of minutes, where the specification is accurate to the nearest millisecond.

System_CAPS_pubmethodSystem_CAPS_staticFromSeconds(Double)

Returns a TimeSpan that represents a specified number of seconds, where the specification is accurate to the nearest millisecond.

System_CAPS_pubmethodSystem_CAPS_staticFromTicks(Int64)

Returns a TimeSpan that represents a specified time, where the specification is in units of ticks.

System_CAPS_pubmethodGetHashCode()

Returns a hash code for this instance.(Overrides ValueType.GetHashCode().)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodNegate()

Returns a new TimeSpan object whose value is the negated value of this instance.

System_CAPS_pubmethodSystem_CAPS_staticParse(String)

Converts the string representation of a time interval to its TimeSpan equivalent.

System_CAPS_pubmethodSystem_CAPS_staticParse(String, IFormatProvider)

Converts the string representation of a time interval to its TimeSpan equivalent by using the specified culture-specific format information.

System_CAPS_pubmethodSystem_CAPS_staticParseExact(String, String, IFormatProvider)

Converts the string representation of a time interval to its TimeSpan equivalent by using the specified format and culture-specific format information. The format of the string representation must match the specified format exactly.

System_CAPS_pubmethodSystem_CAPS_staticParseExact(String, String, IFormatProvider, TimeSpanStyles)

Converts the string representation of a time interval to its TimeSpan equivalent by using the specified format, culture-specific format information, and styles. The format of the string representation must match the specified format exactly.

System_CAPS_pubmethodSystem_CAPS_staticParseExact(String, String[], IFormatProvider)

Converts the string representation of a time interval to its TimeSpan equivalent by using the specified array of format strings and culture-specific format information. The format of the string representation must match one of the specified formats exactly.

System_CAPS_pubmethodSystem_CAPS_staticParseExact(String, String[], IFormatProvider, TimeSpanStyles)

Converts the string representation of a time interval to its TimeSpan equivalent by using the specified formats, culture-specific format information, and styles. The format of the string representation must match one of the specified formats exactly.

System_CAPS_pubmethodSubtract(TimeSpan)

Returns a new TimeSpan object whose value is the difference between the specified TimeSpan object and this instance.

System_CAPS_pubmethodToString()

Converts the value of the current TimeSpan object to its equivalent string representation.(Overrides ValueType.ToString().)

System_CAPS_pubmethodToString(String)

Converts the value of the current TimeSpan object to its equivalent string representation by using the specified format.

System_CAPS_pubmethodToString(String, IFormatProvider)

Converts the value of the current TimeSpan object to its equivalent string representation by using the specified format and culture-specific formatting information.

System_CAPS_pubmethodSystem_CAPS_staticTryParse(String, IFormatProvider, TimeSpan)

Converts the string representation of a time interval to its TimeSpan equivalent by using the specified culture-specific formatting information, and returns a value that indicates whether the conversion succeeded.

System_CAPS_pubmethodSystem_CAPS_staticTryParse(String, TimeSpan)

Converts the string representation of a time interval to its TimeSpan equivalent and returns a value that indicates whether the conversion succeeded.

System_CAPS_pubmethodSystem_CAPS_staticTryParseExact(String, String, IFormatProvider, TimeSpan)

Converts the string representation of a time interval to its TimeSpan equivalent by using the specified format and culture-specific format information, and returns a value that indicates whether the conversion succeeded. The format of the string representation must match the specified format exactly.

System_CAPS_pubmethodSystem_CAPS_staticTryParseExact(String, String, IFormatProvider, TimeSpanStyles, TimeSpan)

Converts the string representation of a time interval to its TimeSpan equivalent by using the specified format, culture-specific format information, and styles, and returns a value that indicates whether the conversion succeeded. The format of the string representation must match the specified format exactly.

System_CAPS_pubmethodSystem_CAPS_staticTryParseExact(String, String[], IFormatProvider, TimeSpan)

Converts the specified string representation of a time interval to its TimeSpan equivalent by using the specified formats and culture-specific format information, and returns a value that indicates whether the conversion succeeded. The format of the string representation must match one of the specified formats exactly.

System_CAPS_pubmethodSystem_CAPS_staticTryParseExact(String, String[], IFormatProvider, TimeSpanStyles, TimeSpan)

Converts the specified string representation of a time interval to its TimeSpan equivalent by using the specified formats, culture-specific format information, and styles, and returns a value that indicates whether the conversion succeeded. The format of the string representation must match one of the specified formats exactly.

Return to top
Show:
© 2016 Microsoft