Click or drag to resize

TimeSpanExtensionsSafeAddition(TimeSpan, Double) Method

Adds a number of seconds to a time span while clamping the result to the valid TimeSpan range.

Namespace: Altaxo
Assembly: AltaxoBase (in AltaxoBase.dll) Version: 4.8.3572.0 (4.8.3572.0)
Syntax
C#
public static TimeSpan SafeAddition(
	this TimeSpan x,
	double y
)

Parameters

x  TimeSpan
The original time span.
y  Double
The number of seconds to add.

Return Value

TimeSpan
The clamped sum.

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).
See Also