![]() |
String formatting
Okay, tried a few things and just can't get this to work, what I'm TRYING to do is write out a number formated so it's always the same number of digits, would seem simple but...
I've tried :
int i=0;Which just seems to produce a single 0, instead of the 8 I'd like, I've also tried :
int i=0;Which is better because it puts in all the spaces to make it an 8 character, but still only puts a 0 as the final one, anyone have any ideas? I've tried googling it but a lot of topics explain how to make decimals appear, but not pre-numeric 0's. |
Re: String formatting
Knew I was being thick...
:
String.Format("{0:D8}", i)This did it. |
| All times are GMT -5. The time now is 3:34 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC