Mono Class Library: System.DateTime Overview | Members

System.DateTime.AddMilliseconds Method

Adds a specified number of milliseconds to the value of the current instance. [Edit]

public DateTime AddMilliseconds (double value)

Parameters

value
A double containing the number of whole and fractional milliseconds. For example, 4.5 is equivalent to 4 milliseconds and 5,000 ticks. value can be negative or positive. [Edit]

Returns

A DateTime instance set to the sum of the date and time represented by the current instance and the number of milliseconds represented by value. [Edit]

Exceptions

TypeReason
ArgumentOutOfRangeExceptionThe resulting DateTime is less than DateTime.MinValue or greater than DateTime.MaxValue. [Edit]

Remarks

Note: value is rounded to the nearest tick.
[Edit]

Requirements

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