how to format a string (number) as currency?

J

Juan

I get a number from db and display it in a textbox control, how can i format
the value as currency?

thanks,
Juan.
 
P

Patrik Löwendahl [C# MVP]

string.Format("{0:C", dbValue);

are you using databinding? If so you kan hook the parse and format events
for the textbox binding and do he formatting in there.
 

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

Top