I'm trying to make "totalSales" and "totalCommissions" into currency format with decimal points in the right spots. ($250,000.00) Something like this
Console.WriteLine("Totals: " + totalSales + " " + totalCommissions);
I'm trying to make "totalSales" and "totalCommissions" into currency format with decimal points in the right spots. ($250,000.00) Something like this
Console.WriteLine("Totals: " + totalSales + " " + totalCommissions);
Console.WriteLine($"Totals: {totalSales:C} {totalCommissions:C}");
Here's why it works:
https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated