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


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

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