Follow the code (it works):
var teste = 1;
var teste1 = teste.ToString("000000");
Result:
000001
Here is another code (not working):
var teste = "1";
var teste1 = teste.ToString("000000");
Result:
Can not convert from 'string' to 'System.IFormatProvider'
How can I convert string
to ToString
with result "000001"?