I need to make a 40 digit counter variable. It should begin as 0000000000000000000000000000000000000001 and increment to 000000000000000000000000000
0000000000000000000000000000000000000001
000000000000000000000000000
I had to do something similar the other day, but I only needed two zeros. I ended up with
string str = String.Format("{0:00}", myInt);
Not sure if it's fool proof but try
String.Format("{0:0000000000000000000000000000000000000000}", myInt)