[This is preliminary documentation and is subject to change.]
The TimeSpanFormattable type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| TimeSpanFormattable(Int64) | Initializes a new TimeSpanFormattable to the specified number of ticks. | |
| TimeSpanFormattable(TimeSpan) | CTor from TimeSpan | |
| TimeSpanFormattable(TimeSpanFormattable) | Copy CTor | |
| TimeSpanFormattable(Int32, Int32, Int32) | Initializes a new TimeSpanFormattable to a specified number of hours, minutes, and seconds. | |
| TimeSpanFormattable(Int32, Int32, Int32, Int32, Int32) | Initializes a new TimeSpanFormattable to a specified number of days, hours, minutes, seconds, and milliseconds. |
Methods
| Name | Description | |
|---|---|---|
| CompareTo | Compares this instance to a specified TimeSpanFormattable object and returns an indication of their relative values. | |
| Duration | Returns a new TimeSpanFormattable object whose value is the absolute value of the current TimeSpanFormattable object. | |
| Equals(Object) | Returns a value indicating whether this instance is equal to a specified TimeSpanFormattable object. (Overrides ValueType..::..Equals(Object).) | |
| Equals(TimeSpanFormattable) | Indicates whether the current TimeSpanFormattable is equal to another TimeSpanFormattable. | |
| FromDays | Returns a TimeSpanFormattable that represents a specified number of days, where the specification is accurate to the nearest millisecond. | |
| FromHours | Returns a TimeSpanFormattable that represents a specified number of hours, where the specification is accurate to the nearest millisecond. | |
| FromMillseconds | Returns a TimeSpanFormattable that represents a specified number of milliseconds. | |
| FromMinutes | Returns a TimeSpanFormattable that represents a specified number of minutes, where the specification is accurate to the nearest millisecond. | |
| FromSeconds | Returns a TimeSpanFormattable that represents a specified number of seconds, where the specification is accurate to the nearest millisecond. | |
| FromTicks | Returns a TimeSpanFormattable that represents a specified time, where the specification is in units of ticks. | |
| GetHashCode | Returns a hash code for this instance. (Overrides ValueType..::..GetHashCode()()()().) | |
| Parse | Constructs a new TimeSpanFormattable object from a time interval specified in a string. | |
| ToString()()()() | Returns the string representation of the value of this instance. (Overrides ValueType..::..ToString()()()().) | |
| ToString(String) | Formats the value of the current instance using the specified format, numeric format information is obtained from current locale setting of the operating system. If you want to use custom IFormatProvider use overloaded ToString()()()() function. | |
| ToString(String, IFormatProvider) | Formats the value of the current instance using the specified format. | |
| TryParse(String, TimeSpanFormattable%) | Constructs a new TimeSpanFormattable object from a time interval specified in a string. Parameters specify the time interval and the variable where the new TimeSpanFormattable object is returned. | |
| TryParse(String, IFormatProvider, TimeSpanFormattable%) | Constructs a new TimeSpanFormattable object from a time interval specified in a string. Parameters specify the time interval and the variable where the new TimeSpanFormattable object is returned. |
Operators
Fields
| Name | Description | |
|---|---|---|
| efLong | Expanded pattern of predefined format G - long with full hours | |
| efLongTime | Expanded pattern of predefined format T - long time patern | |
| efShort | Expanded pattern of predefined format g - short with full hours | |
| efShortest_dl | Expanded pattern of predefined format L - shortest possible from days to milliseconds | |
| efShortest_ds | Expanded pattern of predefined format L - shortest possible from days to seconds | |
| efShortest_hl | Expanded pattern of predefined format l - shortest possible from hours to milliseconds | |
| efShortest_hs | Expanded pattern of predefined format L - shortest possible hours days to seconds | |
| efShortTime | Expanded pattern of predefined format t - short time pattern | |
| pfLong | Short code of predefined format G - long with full hours | |
| pfLongTime | Short code of predefined format T - long time patern | |
| pfShort | Short code of predefined format g - short with full hours | |
| pfShortest_dl | Short code of predefined format L - shortest possible from days to milliseconds | |
| pfShortest_ds | Short code of predefined format L - shortest possible from days to seconds | |
| pfShortest_hl | Short code of predefined format l - shortest possible from hours to milliseconds | |
| pfShortest_hs | Short code of predefined format L - shortest possible hours days to seconds | |
| pfShortTime | Short code of predefined format t - short time pattern |
Properties
| Name | Description | |
|---|---|---|
| Days | Gets the number of whole days represented by the current TimeSpanFormattable structure. | |
| Hours | Gets the number of whole hours represented by the currentTimeSpanFormattable structure. | |
| Milliseconds | Gets the number of whole milliseconds represented by the current TimeSpanFormattable structure. | |
| Minutes | Gets the number of whole minutes represented by the current TimeSpanFormattable structure. | |
| PredefinedFormats | Gets dictionary of all predefined formats. Keys contain short codes, values contain expanded patterns. | |
| Seconds | Gets the number of whole seconds represented by the current TimeSpanFormattable structure. | |
| Ticks | Gets the number of ticks that represent the value of the current TimeSpanFormattable structure. | |
| TotalDays | Gets the value of the current TimeSpanFormattable structure expressed in whole and fractional days. | |
| TotalHours | Gets the value of the current TimeSpanFormattable structure expressed in whole and fractional hours. | |
| TotalMilliseconds | Gets the value of the current TimeSpanFormattable structure expressed in whole and fractional milliseconds. | |
| TotalMinutes | Gets the value of the current TimeSpanFormattable structure expressed in whole and fractional minutes. | |
| TotalSeconds | Gets the value of the current TimeSpanFormattable structure expressed in whole and fractional seconds. |