# Decimal.Decrement(Decimal) 演算子

## 定義

Decimal オペランドを 1 だけデクリメントします。Decrements the Decimal operand by one.

``````public:
static System::Decimal operator --(System::Decimal d);``````
``public static decimal operator -- (decimal d);``
``static member op_Decrement : decimal -> decimal``
``Public Shared op_Decrement (d As Decimal) As Decimal``

#### パラメーター

d
Decimal

デクリメントする値。The value to decrement.

#### 戻り値

Decimal

1 だけデクリメントした `d` の値。The value of `d` decremented by 1.

## 注釈

メソッドは、 Decrement 値のデクリメント演算子の演算を定義し Decimal ます。The Decrement method defines the operation of the decrement operator for Decimal values. 次のようなコードが有効になります。It enables code such as the following:

``````using System;

public class Example
{
public static void Main()
{
Decimal number = 1079.8m;
Console.WriteLine("Original value:    {0:N}", number);
Console.WriteLine("Decremented value: {0:N}", --number);
}
}
// The example displays the following output:
//       Original value:    1,079.80
//       Decremented value: 1,078.80
``````

``````Module Example
Public Sub Main()
Dim number As Decimal = 1079.8d
Console.WriteLine("Original value:    {0:N}", number)
Console.WriteLine("Decremented value: {0:N}", Decimal.op_Decrement(number))
End Sub
End Module
' The example displays the following output:
'       Original value:    1,079.80
'       Decremented value: 1,078.80
``````

``````using System;

public class Example
{
public static void Main()
{
Decimal number = 1079.8m;
Console.WriteLine("Original value:    {0:N}", number);
Console.WriteLine("Decremented value: {0:N}", Decimal.Subtract(number, 1));
}
}
// The example displays the following output:
//       Original value:    1,079.80
//       Decremented value: 1,078.80
``````
``````Module Example
Public Sub Main()
Dim number As Decimal = 1079.8d
Console.WriteLine("Original value:    {0:N}", number)
Console.WriteLine("Decremented value: {0:N}", Decimal.Subtract(number, 1))
End Sub
End Module
' The example displays the following output:
'       Original value:    1,079.80
'       Decremented value: 1,078.80
``````