Uređivanje

Dijeli putem


DateTime.AddMicroseconds(Double) Method

Definition

Returns a new DateTime that adds the specified number of microseconds to the value of this instance.

public:
 DateTime AddMicroseconds(double value);
public DateTime AddMicroseconds (double value);
member this.AddMicroseconds : double -> DateTime
Public Function AddMicroseconds (value As Double) As DateTime

Parameters

value
Double

A number of whole and fractional microseconds. The value parameter can be negative or positive. Note that this value is rounded to the nearest integer.

Returns

An object whose value is the sum of the date and time represented by this instance and the number of microseconds represented by value.

Exceptions

The resulting DateTime is less than MinValue or greater than MaxValue.

Remarks

This method does not change the value of this DateTime. Instead, it returns a new DateTime whose value is the result of this operation.

The fractional part of value is the fractional part of a microsecond. For example, 4.5 is equivalent to 4 microseconds and 50 ticks, where one microsecond = 10 ticks.

The value parameter is rounded to the nearest integer.

Applies to