Formatting currency values : decimal format « Data Type « C# / CSharp Tutorial






class MainClass
{
  public static void Main(){
    // 
    decimal myMoney = 15123.45m;
    System.Console.WriteLine("myMoney using 10:c2 = {0, 10:c2}",myMoney);
  }

}
myMoney using 10:c2 = $15,123.45








2.33.decimal format
2.33.1.Formatting currency values