String Formatting; Tailing Zero's

  • Thread starter Thread starter Shaw
  • Start date Start date
S

Shaw

I have a number, for example 17.7 and I want to format to a string as
"17.70", with the tailing zero.

Using Math.Round( dValue, 2 ) - produces "17.7".

Any other functions which will do what I want, before I start writing
formatting code?

Thanks
 
I have a number, for example 17.7 and I want to format to a string as
"17.70", with the tailing zero.

Using Math.Round( dValue, 2 ) - produces "17.7".

Any other functions which will do what I want, before I start writing
formatting code?

dValue.ToString("f2")

Jon
 

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