Export (0) Print
Expand All

TimeSpan Members

TimeSpan overview

Public Constructors

public constructorTimeSpan Constructor

Supported by the .NET Compact Framework.

Overloaded. Initializes a new TimeSpan.

Public Fields

public fieldstatic (Shared in Visual Basic)MaxValue

Supported by the .NET Compact Framework.

Represents the maximum TimeSpan value. This field is read-only.
public fieldstatic (Shared in Visual Basic)MinValue

Supported by the .NET Compact Framework.

Represents the minimum TimeSpan value. This field is read-only.
public fieldstatic (Shared in Visual Basic)TicksPerDay

Supported by the .NET Compact Framework.

Represents the number of ticks in 1 day. This field is constant.
public fieldstatic (Shared in Visual Basic)TicksPerHour

Supported by the .NET Compact Framework.

Represents the number of ticks in 1 hour. This field is constant.
public fieldstatic (Shared in Visual Basic)TicksPerMillisecond

Supported by the .NET Compact Framework.

Represents the number of ticks in 1 millisecond. This field is constant.
public fieldstatic (Shared in Visual Basic)TicksPerMinute

Supported by the .NET Compact Framework.

Represents the number of ticks in 1 minute. This field is constant.
public fieldstatic (Shared in Visual Basic)TicksPerSecond

Supported by the .NET Compact Framework.

Represents the number of ticks in 1 second.
public fieldstatic (Shared in Visual Basic)Zero

Supported by the .NET Compact Framework.

Represents the zero TimeSpan value. This field is read-only.

Public Properties

public propertyDays

Supported by the .NET Compact Framework.

Gets the number of whole days represented by this instance.
public propertyHours

Supported by the .NET Compact Framework.

Gets the number of whole hours represented by this instance.
public propertyMilliseconds

Supported by the .NET Compact Framework.

Gets the number of whole milliseconds represented by this instance.
public propertyMinutes

Supported by the .NET Compact Framework.

Gets the number of whole minutes represented by this instance.
public propertySeconds

Supported by the .NET Compact Framework.

Gets the number of whole seconds represented by this instance.
public propertyTicks

Supported by the .NET Compact Framework.

Gets the value of this instance in ticks.
public propertyTotalDays

Supported by the .NET Compact Framework.

Gets the value of this instance expressed in whole and fractional days.
public propertyTotalHours

Supported by the .NET Compact Framework.

Gets the value of this instance expressed in whole and fractional hours.
public propertyTotalMilliseconds

Supported by the .NET Compact Framework.

Gets the value of this instance expressed in whole and fractional milliseconds.
public propertyTotalMinutes

Supported by the .NET Compact Framework.

Gets the value of this instance expressed in whole and fractional minutes.
public propertyTotalSeconds

Supported by the .NET Compact Framework.

Gets the value of this instance expressed in whole and fractional seconds.

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.

Public Operators

public operatorstatic (Shared in Visual Basic)Addition Operator

Supported by the .NET Compact Framework.

Adds two specified TimeSpan instances.
public operatorstatic (Shared in Visual Basic)Equality Operator

Supported by the .NET Compact Framework.

Indicates whether two TimeSpan instances are equal.
public operatorstatic (Shared in Visual Basic)Greater Than Operator

Supported by the .NET Compact Framework.

Indicates whether a specified TimeSpan is greater than another specified TimeSpan.
public operatorstatic (Shared in Visual Basic)Greater Than Or Equal Operator

Supported by the .NET Compact Framework.

Indicates whether a specified TimeSpan is greater than or equal to another specified TimeSpan.
public operatorstatic (Shared in Visual Basic)Inequality Operator

Supported by the .NET Compact Framework.

Indicates whether two TimeSpan instances are not equal.
public operatorstatic (Shared in Visual Basic)Less Than Operator

Supported by the .NET Compact Framework.

Indicates whether a specified TimeSpan is less than another specified TimeSpan.
public operatorstatic (Shared in Visual Basic)Less Than Or Equal Operator

Supported by the .NET Compact Framework.

Indicates whether a specified TimeSpan is less than or equal to another specified TimeSpan.
public operatorstatic (Shared in Visual Basic)Subtraction Operator

Supported by the .NET Compact Framework.

Subtracts a specified TimeSpan from another specified TimeSpan.
public operatorstatic (Shared in Visual Basic)Unary Negation Operator

Supported by the .NET Compact Framework.

Returns a TimeSpan whose value is the negated value of the specified instance.
public operatorstatic (Shared in Visual Basic)Unary Plus Operator Returns the specified instance of TimeSpan.

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:
© 2015 Microsoft