# Decimal.Increment(Decimal) 演算子

## 定義

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

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

#### パラメーター

d
Decimal

インクリメントする値。The value to increment.

#### 戻り値

Decimal

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

## 注釈

メソッドは、 Increment 値のインクリメント演算子の演算を定義し Decimal ます。The Increment method defines the operation of the increment 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("Incremented value: {0:N}", ++number);
}
}
// The example displays the following output:
//       Original value:    1,079.80
//       Incremented value: 1,080.80
``````

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

``````using System;

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