Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
microsoft.public.dotnet.framework
Zero Fill a Integer Value
Barry
7/25/2008 8:25:00 AM
Hi
How do i get the following (add leading zeros to a numeric value after
converting to string)
0001
0002
0003
.....
......
......
TIA
Barry
1 Answer
Patrice
7/25/2008 9:16:00 AM
0
You could use MyInteger.ToString("0000").
See the ToString doc for details :
http://msdn.microsoft.com/en-us/library/8wc...
"Barry" <someone@hello.com> a écrit dans le message de groupe de discussion
: etjal$i7IHA.3648@TK2MSFTNGP03.phx.gbl...
> Hi
>
> How do i get the following (add leading zeros to a numeric value after
> converting to string)
>
> 0001
> 0002
> 0003
> ....
> .....
> .....
>
> TIA
> Barry
>
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Zero Fill a Integer Value
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password