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 Plus Operator

Returns the negated value of the specified Decimal.

[C#]
public static Decimal operator +(
   Decimal d
);
[C++]
public: static Decimal operator op_UnaryPlus(
   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
The Decimal value to make positive.

Parameters [C#, C++]

d
The Decimal value to make positive.

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

Value Type Condition
d If the Decimal value is non-zero.
  If the Decimal value is zero.

Exceptions

Exception Type Condition
OverflowException is thrown if the Decimal value is equal to Decimal.MinValue.

Remarks [C#, C++, JScript]

The op_UnaryPlus method returns the positive value of the specified Decimal. For example:

If the Decimal value (d) is non-zero, the result is the positive of the Decimal value (+ d).

If the Decimal value (d) is zero, the result is zero (0).

See Also

Decimal Structure | Decimal Members | System Namespace