Mono Class Library: System.TimeSpan Overview | Members

System.TimeSpan Subtraction Operator

Subtracts the value of one TimeSpan from the value of another TimeSpan.

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

Parameters

t1
The first TimeSpan.
t2
The second TimeSpan.

Returns

A TimeSpan 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