Good day,
I am currently learning C# and wrote a formatted string that should show how much a product costs:
using System;
namespace Formatting {
public class Program {
static void Main(string[] args) {
int numerOfApples = 12;
decimal pricePerApple = 0.35m;
Console.WriteLine(
format: "{0} apples const {1:c}",
arg0: numerOfApples,
arg1: pricePerApple * numerOfApples);
12 apples cost ? 4,20
I have looked at the settings in my regional configuration and everything seems okay there...
I also ran the code in the terminal of visual code itself, searched the web, StackOverflow, and glanced at the documentation without any result.
Thanks in advance for teaching me something new.