Share via


UnaryNegation Operator

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Returns a TimeSpan whose value is the negated value of the specified instance.

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)

Syntax

'Declaration
Public Shared Operator - ( _
    t As TimeSpan _
) As TimeSpan
public static TimeSpan operator -(
    TimeSpan t
)
public:
static TimeSpan operator -(
    TimeSpan t
)
static let inline (-)
        t:TimeSpan  : TimeSpan
JScript does not support overloaded operators.

Parameters

Return Value

Type: System. . :: . .TimeSpan
An object that has the same numeric value as this instance, but the opposite sign.

.NET Framework Security

See Also

Reference

TimeSpan Structure

System Namespace