TimeSpan

Description

The TimeSpan class represents time interval.

Properties of the TimeSpan Class

  Property name Brief description
The MaxValue property returns the maximum value of TimeSpan.
The MinValue property returns the minimum value of TimeSpan.
The Zero property returns the zero value of TimeSpan.

Methods of the TimeSpan Class

  Method name Brief description
The Add method increases the specified time interval by the specified amount.
The Compose method creates a time interval from the specified input parameters.
The FromDays method creates a time interval of the specified number of days.
The FromDouble method returns time interval value obtained by conversion from the Double format.
The FromDays method creates a time interval of the specified number of days.
The FromMilliseconds method creates a time interval of the specified number of milliseconds.
The FromDays method creates a time interval of the specified number of days.
The FromMilliseconds method creates a time interval of the specified number of milliseconds.
The Parse method converts a string value to the TimeSpan type.
The Subtract method decreases the time interval by the specified amount.

Properties of Variables of the TimeSpan Type

  Property name Brief description
The Days property returns the number of full days in the time interval.
The Duration property returns the absolute value of the time interval.
The Hours property returns the number of full hours in the time interval.
The Milliseconds property returns the number of full milliseconds in the time interval.
The Minutes property returns the number of full minutes in the time interval.
The Negate property returns the time interval that is opposite to the given one.
The Seconds property returns the number of full seconds in the time interval.
The ToDouble property returns the value of a time interval in the Double format.
The ToString property returns the value of the time interval converted into string type.
The TotalDays property returns the time interval in days.
The TotalHours property returns the time interval in hours.
The TotalMilliseconds property returns length of the time interval in milliseconds.
The TotalMinutes property returns the time interval in minutes.
The TotalSeconds property returns the time interval in seconds.

See also:

System Assembly Classes