C# Decimal UnaryPlus
Description
Decimal UnaryPlus
returns the value of the Decimal operand
(the sign of the operand is unchanged).
Syntax
Decimal.UnaryPlus
has the following syntax.
public static decimal operator +(
decimal d
)
Parameters
Decimal.UnaryPlus
has the following parameters.
d
- The operand to return.
Returns
Decimal.UnaryPlus
method returns The value of the operand, d.
Example
/*ww w.java 2 s .c o m*/
using System;
public class Example
{
public static void Main()
{
Decimal number1 = 120.07m;
Decimal number2 = +163.19m;
Decimal number3 = number1 - number2;
Console.WriteLine(number3);
}
}
The code above generates the following result.