Returns the DateTime resulting from adding the specified number of milliseconds to the specified DateTime.
[Visual Basic] Overridable Public Function AddMilliseconds( _ ByVal time As DateTime, _ ByVal milliseconds As Double _ ) As DateTime [C#] public virtual DateTime AddMilliseconds( DateTime time, double milliseconds ); [C++] public: virtual DateTime AddMilliseconds( DateTime time, double milliseconds ); [JScript] public function AddMilliseconds( time : DateTime, milliseconds : double ) : DateTime;
The DateTime resulting from adding the specified number of milliseconds to the specified DateTime.
Exception Type | Condition |
---|---|
ArgumentException | is thrown if the resulting DateTime is outside the supported range. |
The result is computed by rounding milliseconds to the nearest integer, and adding that interval to the specified DateTime. The milliseconds argument is permitted to be negative.
Calendar Class | Calendar Members | System.Globalization Namespace