471,356 Members | 1,703 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

String Formatting; Tailing Zero's

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
Jul 15 '08 #1
1 1349
On Jul 15, 5:11*pm, Shaw <nws...@yahoo.comwrote:
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
Jul 15 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

10 posts views Thread by Pascal | last post: by
7 posts views Thread by Roger Helliwell | last post: by
6 posts views Thread by Larry Lard | last post: by
3 posts views Thread by Ulrich Eckhardt | 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.