ToTimeSpan Method
Definition
- Namespace
- Cuemon.Extensions
- Assemblies
- Cuemon.Extensions.Core.dll
ToTimeSpan(string, TimeUnit)
Converts the specified value to its equivalent TimeSpan representation.
public static TimeSpan ToTimeSpan(this string value, TimeUnit timeUnit)
Parameters
valuestringThe string to extend.
timeUnitTimeUnitOne of the enumeration values that specifies the outcome of the conversion.
Returns
Exceptions
- ArgumentNullException
valueis null.- OverflowException
The
valuepaired withtimeUnitis outside its valid range.- ArgumentOutOfRangeException
timeUnitwas outside its valid range.