Export (0) Print
Expand All

TimeSpan Methods

The methods of the TimeSpan structure are listed here. For a complete list of TimeSpan structure members, see the TimeSpan Members topic.

Public Methods

public methodAdd

Supported by the .NET Compact Framework.

Adds the specified TimeSpan to this instance.
public methodstatic (Shared in Visual Basic)Compare

Supported by the .NET Compact Framework.

Compares two TimeSpan values and returns an integer that indicates their relationship.
public methodCompareTo

Supported by the .NET Compact Framework.

Compares this instance to a specified object and returns an indication of their relative values.
public methodDuration

Supported by the .NET Compact Framework.

Returns a TimeSpan whose value is the absolute value of this instance.
public methodEquals

Supported by the .NET Compact Framework.

Overloaded. Overridden. Returns a value indicating whether two instances of TimeSpan are equal.
public methodstatic (Shared in Visual Basic)FromDays

Supported by the .NET Compact Framework.

Returns a TimeSpan that represents a specified number of days, where the specification is accurate to the nearest millisecond.
public methodstatic (Shared in Visual Basic)FromHours

Supported by the .NET Compact Framework.

Returns a TimeSpan that represents a specified number of hours, where the specification is accurate to the nearest millisecond.
public methodstatic (Shared in Visual Basic)FromMilliseconds

Supported by the .NET Compact Framework.

Returns a TimeSpan that represents a specified number of milliseconds.
public methodstatic (Shared in Visual Basic)FromMinutes

Supported by the .NET Compact Framework.

Returns a TimeSpan that represents a specified number of minutes, where the specification is accurate to the nearest millisecond.
public methodstatic (Shared in Visual Basic)FromSeconds

Supported by the .NET Compact Framework.

Returns a TimeSpan that represents a specified number of seconds, where the specification is accurate to the nearest millisecond.
public methodstatic (Shared in Visual Basic)FromTicks

Supported by the .NET Compact Framework.

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

Supported by the .NET Compact Framework.

Overridden. Returns a hash code for this instance.
public methodGetType (inherited from Object)

Supported by the .NET Compact Framework.

Gets the Type of the current instance.
public methodNegate

Supported by the .NET Compact Framework.

Returns a TimeSpan whose value is the negated value of this instance.
public methodstatic (Shared in Visual Basic)Parse

Supported by the .NET Compact Framework.

Constructs a TimeSpan from a time indicated by a specified string.
public methodSubtract

Supported by the .NET Compact Framework.

Subtracts the specified TimeSpan from this instance.
public methodToString

Supported by the .NET Compact Framework.

Overridden. Returns the string representation of the value of this instance.

Protected Methods

protected methodFinalize (inherited from Object)

Supported by the .NET Compact Framework.

Overridden. Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.

In C# and C++, finalizers are expressed using destructor syntax.

protected methodMemberwiseClone (inherited from Object)

Supported by the .NET Compact Framework.

Creates a shallow copy of the current Object.

See Also

TimeSpan Structure | System Namespace

Show:
© 2014 Microsoft