Click or drag to resize

DateTimeOperationsAddSeconds Method

Adds the specified number of seconds to the value of this instance.

Namespace:  TomsToolbox.Essentials
Assembly:  TomsToolbox.Essentials (in TomsToolbox.Essentials.dll)
Syntax
public static TimeSpan AddSeconds(
	this TimeSpan timeSpan,
	double value
)

Parameters

timeSpan
Type: SystemTimeSpan
The time span.
value
Type: SystemDouble
A number of whole and fractional seconds. The value parameter can be negative or positive.

Return Value

Type: TimeSpan
A TimeSpan that represents the value of this instance plus the value of value.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type TimeSpan. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Exceptions
ExceptionCondition
OverflowExceptionThe resulting TimeSpan is less than MinValue or greater than MaxValue.
See Also