Click or drag to resize
TimeSpanUnaryNegation Operator
Returns a TimeSpan whose value is the negated value of the specified instance.

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

Parameters

t
Type: SystemTimeSpan
The time interval to be negated.

Return Value

Type: TimeSpan
An object that has the same numeric value as this instance, but the opposite sign.
Exceptions
ExceptionCondition
OverflowExceptionThe negated value of this instance cannot be represented by a TimeSpan; that is, the value of this instance is MinValue.
See Also