-1

I've got an issue here:

I typed my C# Code by formatting strings to currencies, it shows some question mark instead of giving the native currencies that was actually expected.

Code for reference:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WorkingWithStrings
{
    class Program
    {
        static void Main(string[] args)
        {

            //CURRENCY
            string myString = string.Format("{0:C}",125);


            Console.WriteLine(myString);
            Console.ReadLine();
        }
    }
}


Now, the output comes like this: ? Coming

And the computer's language is English United States.

How'd i fix it?

1 Answers1

0

Could you add :

Console.OutputEncoding = Encoding.UTF8;

Mehmet
  • 55
  • 5