This documentation is archived and is not being maintained.

TimeSpan Methods

The TimeSpan type exposes the following members.

  NameDescription
Public method Supported by the .NET Compact Framework Supported by the XNA Framework Add Returns a new TimeSpan object whose value is the sum of the specified TimeSpan object and this instance.
Public method Static member Supported by the .NET Compact Framework Supported by the XNA Framework Compare 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.
Public method Supported by the .NET Compact Framework Supported by the XNA Framework CompareTo Overloaded. Compares this instance to a specified object or TimeSpan object and returns an integer that indicates whether this instance is shorter than, equal to, or longer than the specified object or TimeSpan object.
Public method Supported by the .NET Compact Framework Supported by the XNA Framework Duration Returns a new TimeSpan object whose value is the absolute value of the current TimeSpan object.
Public method Static member Supported by the .NET Compact Framework Supported by the XNA Framework Equals Overloaded. Returns a value indicating whether two instances of TimeSpan are equal.
Protected method Supported by the .NET Compact Framework Supported by the XNA Framework Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method Static member Supported by the .NET Compact Framework Supported by the XNA Framework FromDays Returns a TimeSpan that represents a specified number of days, where the specification is accurate to the nearest millisecond.
Public method Static member Supported by the .NET Compact Framework Supported by the XNA Framework FromHours Returns a TimeSpan that represents a specified number of hours, where the specification is accurate to the nearest millisecond.
Public method Static member Supported by the .NET Compact Framework Supported by the XNA Framework FromMilliseconds Returns a TimeSpan that represents a specified number of milliseconds.
Public method Static member Supported by the .NET Compact Framework Supported by the XNA Framework FromMinutes Returns a TimeSpan that represents a specified number of minutes, where the specification is accurate to the nearest millisecond.
Public method Static member Supported by the .NET Compact Framework Supported by the XNA Framework FromSeconds Returns a TimeSpan that represents a specified number of seconds, where the specification is accurate to the nearest millisecond.
Public method Static member Supported by the .NET Compact Framework Supported by the XNA Framework FromTicks Returns a TimeSpan that represents a specified time, where the specification is in units of ticks.
Public method Supported by the .NET Compact Framework Supported by the XNA Framework GetHashCode Returns a hash code for this instance. (Overrides ValueType.GetHashCode().)
Public method Supported by the .NET Compact Framework Supported by the XNA Framework GetType Gets the type of the current instance. (Inherited from Object.)
Protected method Supported by the .NET Compact Framework Supported by the XNA Framework MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method Supported by the .NET Compact Framework Supported by the XNA Framework Negate Returns a new TimeSpan object whose value is the negated value of this instance.
Public method Static member Supported by the .NET Compact Framework Supported by the XNA Framework Parse Constructs a new TimeSpan object from a time interval specified in a string.
Public method Supported by the .NET Compact Framework Supported by the XNA Framework Subtract Returns a new TimeSpan object whose value is the difference between the specified TimeSpan object and this instance.
Public method Supported by the .NET Compact Framework Supported by the XNA Framework ToString Returns the string representation of the value of this instance. (Overrides ValueType.ToString().)
Public method Static member TryParse Constructs a new TimeSpan object from a time interval specified in a string. Parameters specify the time interval and the variable where the new TimeSpan object is returned.
Top
Show: