System.Decimal.op_UnaryNegation Method

Negates the value of the specified decimal operand.

Syntax

public static decimal operator- (decimal d)

Parameters

d
The value to negate.

Returns

The result of d multiplied by negative one (-1).

Remarks

The decimal.op_UnaryPlus(decimal) method defines the operation of the unary negation operator (or the additive inverse operator) for decimal values. The operation produces a value that results in 0 (zero) when it is added to the original number. Languages that do not support custom operators can call the decimal.Negate(decimal) method instead.

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0