Bridge

TimeSpan Members

The TimeSpan type exposes the following members.

Constructors


  Name Description
Public method TimeSpan(Int64)
Initializes a new instance of the TimeSpan structure to the specified number of ticks.
Public method TimeSpan(Int32, Int32, Int32)
Initializes a new instance of the TimeSpan structure to a specified number of hours, minutes, and seconds.
Public method TimeSpan(Int32, Int32, Int32, Int32)
Initializes a new instance of the TimeSpan structure to a specified number of days, hours, minutes, and seconds.
Public method TimeSpan(Int32, Int32, Int32, Int32, Int32)
Initializes a new instance of the TimeSpan structure to a specified number of days, hours, minutes, seconds, and milliseconds.

Methods


  Name Description
Public method Add
Public method Static member Compare
Public method CompareTo(Object)
Compares this instance to a specified object and returns an integer that indicates whether this instance is shorter than, equal to, or longer than the specified object.
Public method CompareTo(TimeSpan)
Public method Duration
Returns a new TimeSpan object whose value is the absolute value of the current TimeSpan object.
Public method Equals(TimeSpan)
Public method Static member Equals(TimeSpan, TimeSpan)
Public method Format(String)
Public method Format(String, IFormatProvider)
Public method Static member FromDays
Returns a TimeSpan that represents a specified number of days, where the specification is accurate to the nearest millisecond.
Public method Static member FromHours
Returns a TimeSpan that represents a specified number of hours, where the specification is accurate to the nearest millisecond.
Public method Static member FromMilliseconds
Returns a TimeSpan that represents a specified number of milliseconds.
Public method Static member FromMinutes
Returns a TimeSpan that represents a specified number of minutes, where the specification is accurate to the nearest millisecond.
Public method Static member FromSeconds
Returns a TimeSpan that represents a specified number of seconds, where the specification is accurate to the nearest millisecond.
Public method Static member FromTicks
Returns a TimeSpan that represents a specified time, where the specification is in units of ticks.
Public method Negate
Returns a new TimeSpan object whose value is the negated value of this instance.
Public method Subtract
Public method ToString(String)
Converts the value of the current TimeSpan object to its equivalent string representation by using the specified format.
Public method ToString(String, IFormatProvider)

Fields


  Name Description
Public field Static member MaxValue
Represents the maximum TimeSpan value. This field is read-only.
Public field Static member MinValue
Represents the minimum TimeSpan value. This field is read-only.
Public field Static member TicksPerDay
Represents the number of ticks in 1 day. This field is constant.
Public field Static member TicksPerHour
Represents the number of ticks in 1 hour. This field is constant.
Public field Static member TicksPerMillisecond
Represents the number of ticks in 1 millisecond. This field is constant.
Public field Static member TicksPerMinute
Represents the number of ticks in 1 minute. This field is constant.
Public field Static member TicksPerSecond
Represents the number of ticks in 1 second.
Public field Static member Zero
Represents the zero TimeSpan value. This field is read-only.

Properties


  Name Description
Public property Days
Gets the days component of the time interval represented by the current TimeSpan structure.
Public property Hours
Gets the hours component of the time interval represented by the current TimeSpan structure.
Public property Milliseconds
Gets the milliseconds component of the time interval represented by the current TimeSpan structure.
Public property Minutes
Gets the minutes component of the time interval represented by the current TimeSpan structure.
Public property Seconds
Gets the seconds component of the time interval represented by the current TimeSpan structure.
Public property Ticks
Gets the number of ticks that represent the value of the current TimeSpan structure.
Public property TotalDays
Gets the value of the current TimeSpan structure expressed in whole and fractional days.
Public property TotalHours
Gets the value of the current TimeSpan structure expressed in whole and fractional hours.
Public property TotalMilliseconds
Gets the value of the current TimeSpan structure expressed in whole and fractional milliseconds.
Public property TotalMinutes
Gets the value of the current TimeSpan structure expressed in whole and fractional minutes.
Public property TotalSeconds
Gets the value of the current TimeSpan structure expressed in whole and fractional seconds.