Class TimeSpanConverter
This utility class is designed to make System.TimeSpan related conversions easier to work with.
Inheritance
Namespace: Cuemon
Assembly: Cuemon.Core.dll
Syntax
public static class TimeSpanConverter
Methods
| Improve this DocFromDouble(Double, TimeUnit)
Converts the specified value
to its equivalent System.TimeSpan representation.
Declaration
public static TimeSpan FromDouble(double value, TimeUnit timeUnit)
Parameters
Type | Name | Description |
---|---|---|
System.Double | value | The value to be converted. |
TimeUnit | timeUnit | One of the enumeration values that specifies the outcome of the conversion. |
Returns
Type | Description |
---|---|
System.TimeSpan | A System.TimeSpan that corresponds to |
Exceptions
Type | Condition |
---|---|
System.OverflowException | The |
System.ArgumentOutOfRangeException |
|
FromString(String, TimeUnit)
Converts the specified value
to its equivalent System.TimeSpan representation.
Declaration
public static TimeSpan FromString(string value, TimeUnit timeUnit)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | The string to be converted. |
TimeUnit | timeUnit | One of the enumeration values that specifies the outcome of the conversion. |
Returns
Type | Description |
---|---|
System.TimeSpan | A System.TimeSpan that corresponds to |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
System.OverflowException | The |
System.ArgumentOutOfRangeException |
|