ASP.NET C# Lesson - Formatting Strings #1

hiran108

Well-known member
  • Nov 1, 2006
    1,705
    747
    113
    88
    its getting outdated.
    try this, same , but much readable.

    double amount = 123.34;
    string text = $"amount is {amount:C2}";