Decimal.One
is a decimal field in C#. It represents 1
.
public static readonly decimal One;
This field does not take any parameters, and is only invoked on decimal
.
The returned value is 1
.
// Use the Systemusing System;// Create the classclass HelloWorld{static void Main(){// Print the fieldConsole.WriteLine(Decimal.One);// Create the decimal valuesdecimal decimalNumberOne = Decimal.One;decimal decimalNumberTwo = 3.4m - Decimal.One;decimal decimalNumberThree = 10.00m / Decimal.One;// Print the valuesConsole.WriteLine(decimalNumberOne);Console.WriteLine(decimalNumberTwo);Console.WriteLine(decimalNumberThree);}}
fieldDecimal.One
.Decimal.One
field as a value.