TYPE

decimal (System.Decimal)

A base-10 numeric value type with finite precision, useful for many decimal fraction calculations. The m or M suffix marks decimal literals; it does not eliminate the need for rounding rules.

Formal Syntax & Structure

csharp syntaxcsharp
decimal <identifier> = <decimal-literal>m;

Working Example

Example Snippetcsharp
decimal price = 3.25m;System.Console.WriteLine((price * 2).ToString("0.00", System.Globalization.CultureInfo.InvariantCulture));
C# & .NET Reference