System.TimeSpan.op_Subtraction Method

Subtracts a specified TimeSpan from another specified TimeSpan.

Syntax

public static TimeSpan operator- (TimeSpan t1, TimeSpan t2)

Parameters

t1
The minuend.
t2
The subtrahend.

Returns

An object whose value is the result of the value of t1 minus the value of t2.

Exceptions

TypeReason
OverflowExceptionThe value of t2 subtracted from t1 is less than TimeSpan.MinValue or greater than TimeSpan.MaxValue.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0