Click or drag to resize

DurationSubtract Method

Subtracts the specified Duration from this instance.

Namespace:  AGI.Foundation.Time
Assembly:  AGI.Foundation.Core (in AGI.Foundation.Core.dll) Version: 24.3.420.0 (24.3.420.0)
Syntax
public Duration Subtract(
	Duration other
)

Parameters

other
Type: AGI.Foundation.TimeDuration
The Duration to subtract from this instance.

Return Value

Type: Duration
A Duration that represents the value of this instance minus the value of other.
Exceptions
ExceptionCondition
ArgumentException Thrown if this Duration and other have different TimeStandards.
ArgumentOutOfRangeException Thrown if the result represents a value too large to be stored in a Duration.
Remarks
The two Durations must have the same time standard, or one of the time standards must be null. Attempting to add two Duration instances with different time standards will result in an ArgumentException.
See Also