how to format a number in relevant currencies?

  • Thread starter Thread starter Mohammed Shafiulla Khadri
  • Start date Start date
M

Mohammed Shafiulla Khadri

Hi,

I have to display pound/ euro symbol, when i have to format a number into
respective currency? I dont want to display the default "$" sysmbol? how can
i do this?

regards,
MSK
 
Mohammed,

You can create an instance of NumberFormatInfo (which implements the
IFormatProvider interface). Once you create that, you can set the
CurrencySymbol property to the symbol you wish to use.

The "$" symbol is the default for your current culture.

You can pass the instance of the NumberFormatInfo instance to the
ToString method to have it use that in determining how to create a string
representation of the value.

Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top