Format numbers (amount) according to computer setup in C# -



Format numbers (amount) according to computer setup in C# -

in c# im trying format amount according setup on computer.

so instance if setup on en-us xxxx.xx (separated dot) , in nb-no xxxx.xx (separated comma) want auto-detect , format amount accordingly.

thanks help in advance.

try this

double amount = xxxx.xx; string formattedcurrency=amount.tostring("c", cultureinfo.currentculture);

c#

Comments

Popular posts from this blog

javascript - mongodb won't find my schema method in nested container -

Hibernate criteria by a list of natural ids -

ios - Lagging ScrollView with UIWebview inside -