471,318 Members | 2,057 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,318 software developers and data experts.

how to format a number in relevant currencies?

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
Jan 23 '06 #1
1 1278
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.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Mohammed Shafiulla Khadri" <md***********@hotmail.com> wrote in message
news:uB**************@TK2MSFTNGP11.phx.gbl...
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

Jan 23 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by ADA | last post: by
1 post views Thread by =?Utf-8?B?Y2Fyb2xl?= | last post: by
2 posts views Thread by (PeteCresswell) | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.