# BigInteger.UnaryNegation(BigInteger) 运算符

## 定义

``````public:
static System::Numerics::BigInteger operator -(System::Numerics::BigInteger value);``````
``public static System.Numerics.BigInteger operator - (System.Numerics.BigInteger value);``
``static member ( ~- ) : System.Numerics.BigInteger -> System.Numerics.BigInteger``
``Public Shared Operator - (value As BigInteger) As BigInteger``

value
BigInteger

#### 返回

`value` 参数乘以负一 (-1) 的结果。The result of the `value` parameter multiplied by negative one (-1).

## 示例

``````BigInteger number = 12645002;

Console.WriteLine(BigInteger.Negate(number));        // Displays -12645002
Console.WriteLine(-number);                          // Displays -12645002
Console.WriteLine(number * BigInteger.MinusOne);     // Displays -12645002
``````
``````Dim number As BigInteger = 12645002

Console.WriteLine(BigInteger.Negate(number))          ' Displays -12645002
Console.WriteLine(-number)                            ' Displays -12645002
Console.WriteLine(number * BigInteger.MinusOne)       ' Displays -12645002
``````

## 注解

UnaryNegation 方法定义 BigInteger 值的一元求反运算符（或加法逆运算符）的运算。The UnaryNegation method defines the operation of the unary negation operator (or the additive inverse operator) for BigInteger values. 操作将生成一个值，该值将在添加到原始数字时导致为0（零）。The operation produces a value that results in 0 (zero) when it is added to the original number. 不支持自定义运算符的语言可以改为调用 Negate 方法。Languages that do not support custom operators can call the Negate method instead.