Compartir a través de


TimeSpan.Duration Method

Returns a new TimeSpan object (time period) that has the absolute value of the current TimeSpan object.

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

Syntax

public TimeSpan Duration ()

Return Value

A TimeSpan object that has the absolute value of the current TimeSpan object.

Remarks

The absolute value of a number is its numeric value without regard to its plus sign or minus sign. Therefore, a number's absolute value is always either positive or 0 (zero).

Version Information

Available in the .NET Micro Framework versions 2.0, 2.5, 3.0, 4.0, 4.1, and 4.2.

See Also

Reference

TimeSpan Structure
TimeSpan Members
System Namespace