How to: Convert DOUBLE to PERCENT?

G

Guest

Hello -

I am reading up on the NumberFormatInfo class, trying to figure out how to
convert a double to a percentage, using the IFormatProvider. This seems a
little beyond me. Can anyone suggest an easy way to convert a double to a
percentage in C#?

For example, i would like to render on my web page the following:
..89 = 89%
1 = 100%

Thanks,
 
K

Kevin Spencer

Offhand, I'd guess that multiplying the double by 100 would give you the
percent value.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
The sun never sets on
the Kingdom of Heaven
 
G

Guest

Thanks Kevin,

What i am trying to learn, however, is how to do this using the
NumberFormatInfo class, and/or IFormatProvider interface. This documentation
unfortunately, is not for newbies. Any examples, would be appreciated.

Thanks again,
 

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

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top