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!

GregorianCalendar.AddWeeks

Returns the DateTime resulting from adding a number of weeks to the specified DateTime.

[Visual Basic]
Overrides Public Function AddWeeks( _
   ByVal time As DateTime, _
   ByVal weeks As Integer _
) As DateTime
[C#]
public override DateTime AddWeeks(
   DateTime time,
   int weeks
);
[C++]
public: override DateTime AddWeeks(
   DateTime time,
   int weeks
);
[JScript]
public override function AddWeeks(
   time : DateTime,
   weeks : int
) : DateTime;

Parameters

time
The DateTime instance to be added.
weeks
A number of weeks.

Exceptions

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

Remarks

The weeks argument is permitted to be negative.

See Also

GregorianCalendar Class | GregorianCalendar Members | System.Globalization Namespace