NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

DateTime.AddHours

Returns the DateTime result from adding this instance to a fractional number of hours.

[Visual Basic]
Public Function AddHours( _
   ByVal value As Double _
) As DateTime
[C#]
public DateTime AddHours(
   double value
);
[C++]
public: DateTime AddHours(
   double value
);
[JScript]
public function AddHours(
   value : double
) : DateTime;

Parameters

value
A fractional number of hours.

Return Value

The DateTime value that results from adding a fractional number of hours to this instance.

Exceptions

Exception Type Condition
ArgumentOutOfRangeException If the resulting DateTime is outside the supported range.

Remarks

The AddHours returns the value parameter that is computed by rounding the fractional number of hours specified by value to the nearest millisecond of the nearest integer, and then adding the interval to this instance of DateTime.

The value parameter argument is permitted to be negative.

See Also

DateTime Structure | DateTime Members | System Namespace | Double | Hour