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!

Calendar.AddDays

Returns the DateTime object resulting from adding a fractional number of days to the specified DateTime.

[Visual Basic]
Overridable Public Function AddDays( _
   ByVal time As DateTime, _
   ByVal days As Integer _
) As DateTime
[C#]
public virtual DateTime AddDays(
   DateTime time,
   int days
);
[C++]
public: virtual DateTime AddDays(
   DateTime time,
   int days
);
[JScript]
public function AddDays(
   time : DateTime,
   days : int
) : DateTime;

Parameters

time
The DateTime instance to be added.
days
The number of days.

Return Value

The DateTime resulting from adding the specified fractional number of days to the specified DateTime.

Exceptions

Exception Type Condition
ArgumentException is thrown if the resulting DateTime is outside the supported range.

Remarks

The result is computed by rounding the fractional number of days specified by days to the nearest millisecond, and adding that interval to the specified DateTime. The days argument is permitted to be negative.

See Also

Calendar Class | Calendar Members | System.Globalization Namespace