[Solved] How to convert an integer to its string representation adding padding zeros

[ad_1]

It’s in your value assignment. An int of 00 always has value 0. If you want to always show two digits, you need to apply a format to your ToString() call

int num = 00;
string s= num.ToString("D2");   

That should do the trick.

1

[ad_2]

solved How to convert an integer to its string representation adding padding zeros