int value under 10 Convert to string '0x'

Posted by sunglim on Stack Overflow See other posts from Stack Overflow or by sunglim
Published on 2010-06-01T06:28:40Z Indexed on 2010/06/01 6:33 UTC
Read the original article Hit count: 228

Filed under:
|
for(int i = 1;i<100;i++)
   string strI = i.tostirng();

in here, if i is 1 then strI is '1'

But I want to get '01'

or '001'

it looks quite easy. but there's only article about datetime.tostring("yyyy-MM-dd") :(

© Stack Overflow or respective owner

Related posts about c#

Related posts about string