Mono Class Library: System.TimeSpan Overview | Members

System.TimeSpan.FromMilliseconds Method

Returns a TimeSpan that represents the specified number of milliseconds where the specification is accurate to the nearest millisecond. [Edit]

public static TimeSpan FromMilliseconds (double value)

Parameters

value
A double that specifies the number of milliseconds with which the new TimeSpan is initialized. [Edit]

Returns

A TimeSpan that represents value. [Edit]

Exceptions

TypeReason
OverflowExceptionThe TimeSpan represented by value is greater than TimeSpan.MaxValue or less than TimeSpan.MinValue. [Edit]
ArgumentExceptionvalue is equal to double.NaN. [Edit]

Remarks

value will only be considered accurate to the nearest millisecond.

If value is double.PositiveInfinity, a TimeSpan with the value TimeSpan.MaxValue is returned. If value is double.NegativeInfinity, a TimeSpan with the value TimeSpan.MinValue is returned.

[Edit]

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0