Peso Symbol in C# -


if (num1 == 5) {     console.writeline("\nthe " + num2 + " kilo/s of {0} " + 28 + " per kilo ", "grapes");     console.writeline("the total amount {0}{1}", num2.tostring("en-phi"),num2*28); } num2.tostring("en-phi") 

i try 1 doesn't work @ .. copy en-phi..

sounds want provide culture en-phi... although isn't valid culture name apparently. perhaps want phi language?

var culture = cultureinfo.getcultureinfo("phi"); var text = string.format(culture, "the total amount {0:c}", num2 * 28); console.writeline(text); 

the c format specifier "currency".

that's way of printing currency symbol known specific culture... might not want, it's matter of finding right culture.

if want hard-code peso character (u+20b1) can directly:

 console.writeline("the total amount \u20b1{0}", num2); 

now if prints "?" means current console encoding or font doesn't support peso symbol. running command line set utf-8:

> chcp 65001 

make sure font you're using supports character well.


Comments

Popular posts from this blog

php - isset function not working properly -

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -