TimeSpan.UnaryNegation Operator (TimeSpan)
.NET Framework (current version)
Returns a TimeSpan whose value is the negated value of the specified instance.
Assembly: mscorlib (in mscorlib.dll)
Parameters
- t
-
Type:
System.TimeSpan
The time interval to be negated.
Return Value
Type: System.TimeSpanAn object that has the same numeric value as this instance, but the opposite sign.
| Exception | Condition |
|---|---|
| OverflowException | The negated value of this instance cannot be represented by a TimeSpan; that is, the value of this instance is TimeSpan.MinValue. |
Universal Windows Platform
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Show: