I am a beginner in C#

I wrote a program to print a "Amount" of Type Decimal with format specifier C (in my case Currency is ₹ (India) )

but my output shows this

? 34567.60  

i get a ? instead of currency symbol such as a $ or (which is my currency symbol in windows 8.1)


using System;    

namespace ConsoleApplication3
{
    class Program
    {
        static void Main(string[] args)
        {
            decimal amount = 34567.60m;
            Console.WriteLine("{0:C}",amount);  
        }                    
     }
  }

没有正确的解决方案

其他提示

Your console font cannot print this character. Switch the font of your console to something that includes the indian currency character.

You can do this by using the console's menu and selecting properties. It's one of the tabs probably labelled "font" or something similar (sorry, don't have an English version of Windows).

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top