467,925 Members | 1,857 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,925 developers. It's quick & easy.

double to string formatting

Lee
Hi,

I am trying to convert a double to a string using the following
format;-

double = 1.01
string = 01.0100

or

double = 0.01
string = 00.0100

now i can format the bit behind the '.' by using
double.toString("N4"), which for the first example gives me 1.0100 but
how can i format the 01. at the begining.

thanks in advance
lee

Sep 6 '07 #1
  • viewed: 2867
Share:
1 Reply
Lee wrote:
Hi,

I am trying to convert a double to a string using the following
format;-

double = 1.01
string = 01.0100

or

double = 0.01
string = 00.0100

now i can format the bit behind the '.' by using
double.toString("N4"), which for the first example gives me 1.0100 but
how can i format the 01. at the begining.

thanks in advance
lee
double f = 0.01;
f.ToString("00.00000")
Sep 6 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

29 posts views Thread by mrstephengross | last post: by
3 posts views Thread by Danny Woolston | last post: by
2 posts views Thread by Carlos | last post: by
1 post views Thread by bsmith1111 | last post: by
11 posts views Thread by Ole Nielsby | last post: by
2 posts views Thread by Derek Hart | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.