Hi how it's possible to format eg. 1, 2, 3 to 001, 002, 003. With
.ToString() I'm able only to do some decimal formatting only?
Thanks,
Oka Morikawa
Jon Skeet [C# MVP] - 17 May 2004 15:36 GMT
> Hi how it's possible to format eg. 1, 2, 3 to 001, 002, 003. With
> .ToString() I'm able only to do some decimal formatting only?
Use number.ToString("000")

Signature
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Marc Butenko - 17 May 2004 15:56 GMT
You need to use the right format string, such as:
X.ToString("000")
(1).ToString("000") ---> "001"

Signature
Marc Butenko
mbutenko@bresnan.net
> Hi how it's possible to format eg. 1, 2, 3 to 001, 002, 003. With
> .ToString() I'm able only to do some decimal formatting only?
>
> Thanks,
> Oka Morikawa