NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

TimeSpan Members

Public:

Constructor

TimeSpan Constructor Overloaded. Initializes a new instance of the TimeSpan class.

Properties

Days Retrieves the number of whole days represented by the current instance.
Hours Retrieves the number of whole hours represented by the current instance.
Milliseconds Retrieves the number of whole milliseconds represented by the current instance.
Minutes Retrieves the number of whole minutes represented by the current instance.
Seconds Retrieves the number of whole seconds represented by the current instance.
Ticks Retrieves the number of whole ticks represented by the current instance.
TotalDays Retrieves the total number of days represented by the current instance.
TotalHours Retrieves the number of whole hours represented by the current instance.
TotalMilliseconds Retrieves the number of whole milliseconds represented by the current instance.
TotalMinutes Retrieves the number of whole minutes represented by the current instance.
TotalSeconds Retrieves the number of whole seconds represented by the current instance.

Methods

Add Adds the current instance to the specified TimeSpan.
Compare Compares two TimeSpan values and returns an integer that indicates their relationship.
CompareTo Compares the TimeSpan value of the current instance with the specified object.
Duration Gets the duration of the current time span.
Equals Overloaded. Determines whether two TimeSpan objects represent the same time.
FromDays Creates a TimeSpan that represents the number of days specified by a value specified to the nearest millisecond.
FromHours Creates a TimeSpan that represents the number of hours specified by a value specified to the nearest millisecond.
FromMilliseconds Creates a TimeSpan that represents the number of milliseconds specified.
FromMinutes Creates a TimeSpan that represents the number of minutes specified.
FromSeconds Creates a TimeSpan that represents the number of seconds specified by a specified value.
FromString Constructs a TimeSpan from a string.
FromTicks Creates a TimeSpan with a specified ticks value.
GetHashCode Gets a hash code for the current instance.
GetType (inherited from Object) Gets the Type of the Object.
Negate Negates the current TimeSpan new instance.
Parse Constructs a TimeSpan from a string.
Subtract Subtracts a specified TimeSpan value from the current instance.
ToString Overloaded. Converts a TimeSpan to a String.

Operators

Addition Operator Adds two TimeSpan values.
Equality Operator Determines whether two TimeSpan objects are equal.
Greater Than Operator Determines whether the first TimeSpan is greater than to the second TimeSpan.
Greater Than Or Equal Operator Determines wheter the first TimeSpan is greater than and equal to the second TimeSpan.
Inequality Operator Determines whether two TimeSpan objects are equal.
Less Than Operator Determines whether the first TimeSpan is less than to the second TimeSpan.
Less Than Or Equal Operator Determines wheter the first TimeSpan is less than and equal to the second TimeSpan.
Subtraction Operator Subtracts one TimeSpan value from specified TimeSpan.
Unary Negation Operator Subtracts a specified TimeSpan from this instance.

Fields

Empty Represents the constant that is an empty TimeSpan.
MaxValue Represents the constant that is the maximum TimeSpan value.
MinValue Represents the constant that is the smallest TimeSpan value.
TicksPerDay Indicates the number of ticks equivalent to 1 day.
TicksPerHour Indicates the number of ticks equivalent to 1 hour.
TicksPerMillisecond Indicates the number of ticks equivalent to 1 millisecond.
TicksPerMinute Indicates the number of ticks equivalent to 1 minute.
TicksPerSecond Indicates the number of ticks equivalent to 1 second.
Zero Represents the zero TimeSpan value.

Protected:

Methods

Finalize (inherited from Object) Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by the Garbage Collector (GC). This method may be ignored by the runtime; therefore, necessary cleanup operations should be done elsewhere.
MemberwiseClone (inherited from Object) Creates a shallow copy of the current Object.

See Also

TimeSpan Structure | System Namespace