Returns the DateTime resulting from adding a number of weeks to the specified DateTime.
[Visual Basic] Overridable Public Function AddWeeks( _ ByVal time As DateTime, _ ByVal weeks As Integer _ ) As DateTime [C#] public virtual DateTime AddWeeks( DateTime time, int weeks ); [C++] public: virtual DateTime AddWeeks( DateTime time, int weeks ); [JScript] public function AddWeeks( time : DateTime, weeks : int ) : DateTime;
The DateTime resulting from adding the specified number of weeks to the specified DateTime.
Exception Type | Condition |
---|---|
ArgumentException | is thrown if the resulting DateTime is outside the supported range. |
The value argument is permitted to be negative.
Calendar Class | Calendar Members | System.Globalization Namespace