Click or drag to resize
TimeSpanSubtraction Operator
Subtracts a specified TimeSpan from another specified TimeSpan.

Namespace: System
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
public static TimeSpan operator -(
	TimeSpan t1,
	TimeSpan t2
)

Parameters

t1
Type: SystemTimeSpan
The minuend.
t2
Type: SystemTimeSpan
The subtrahend.

Return Value

Type: TimeSpan
An object whose value is the result of the value of t1 minus the value of t2.
Exceptions
ExceptionCondition
OverflowExceptionThe return value is less than MinValue or greater than MaxValue.
See Also