Uređivanje

Dijeli putem


DateTimeOffset.AddMicroseconds(Double) Method

Definition

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

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

Parameters

microseconds
Double

A number of whole and fractional microseconds. The number can be negative or positive.

Returns

An object whose value is the sum of the date and time represented by the current DateTimeOffset object and the number of whole microseconds represented by microseconds.

Exceptions

The resulting DateTimeOffset value is less than DateTimeOffset.MinValue.

-or-

The resulting DateTimeOffset value is greater than DateTimeOffset.MaxValue.

Remarks

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 microseconds = 10 ticks. However, microseconds is rounded to the nearest microsecond; all values of .5 or greater are rounded up.

Because a DateTimeOffset object does not represent the date and time in a specific time zone, the AddMicroseconds(Double) method does not consider a particular time zone's adjustment rules when it performs date and time arithmetic.

Applies to