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!

Decimal Unary Negation Operator

Decrements the specified number.

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

[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]

d
A Decimal value.

Parameters [C#, C++]

d
A Decimal value.

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

The result of evaluating d- 1.

Exceptions

Exception Type Condition
OverflowException is thrown if the result is too small to represent as a Decimal.

Remarks [C#, C++, JScript]

The op_Decrement method performs the arithmetic addition operation of decrementing a specified Decimal value (d- 1)and returns the result.

See Also

Decimal Structure | Decimal Members | System Namespace