NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

TimeSpan Unary Negation Operator

Subtracts a specified TimeSpan from this instance.

[C#]
public static TimeSpan operator -(
   TimeSpan t
);
[C++]
public: static TimeSpan operator op_UnaryNegation(
   TimeSpan t
);
[JScript]
returnValue = -t;

[Visual Basic] In Visual Basic, you cannot use the operators defined by a type, nor override them or define your own.

[JScript] In JScript, you can use the operators defined by a type, but you cannot override them or define your own.

Arguments [JScript]

t
The operand.

Parameters [C#, C++]

t
The operand.

Return Value [C#, C++, JScript]

A new TimeSpan.

Exceptions

Exception Type Condition
OverflowException If t is less than TimeSpan.MinValue.

Remarks [C#, C++, JScript]

This TimeSpan operator performs the arithmetic operation of subtracting a specified TimeSpan from the currrent instance and returns a new TimeSpan in ticks.

See Also

TimeSpan Structure | TimeSpan Members | System Namespace | MinValue | Ticks