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