Table of Contents

ToTimeSpan Method

Definition

Namespace
Cuemon.Extensions
Assemblies
Cuemon.Extensions.Core.dll
Source
src/Cuemon.Extensions.Core/DoubleExtensions.cs

ToTimeSpan(double, TimeUnit)

Converts the specified value to its equivalent TimeSpan representation.

public static TimeSpan ToTimeSpan(this double value, TimeUnit timeUnit)

Parameters

value double

The value to be converted.

timeUnit TimeUnit

One of the enumeration values that specifies the outcome of the conversion.

Returns

TimeSpan

A TimeSpan that corresponds to value from timeUnit.

Exceptions

OverflowException

The value paired with timeUnit is outside its valid range.

ArgumentOutOfRangeException

timeUnit was outside its valid range.