To specify a decimal constant, begin the specification with a nonzero digit. : decimal « Data Type « C# / CSharp Tutorial






using System;

public class MainClass{
    public static void Main() {
        int i = 157;   // Decimal constant
        Console.WriteLine(i);
    }
}








2.30.decimal
2.30.1.Declare decimal variable
2.30.2.To specify a decimal constant, begin the specification with a nonzero digit.
2.30.3.Manually create a decimal number.
2.30.4.The Methods and Fields Defined by Decimal
2.30.5.decimal literal
2.30.6.decimals and arithmetic operators
2.30.7.Decimal ranges
2.30.8.Specifying a Literal decimal
2.30.9.decimal Types