Reputation: 67
I want to make increment that not starts for example from 0 to 1000 but from 0000 to 1000 how i can do that?
Upvotes: 0
Views: 159
Reputation: 460340
You want to to format a number as string:
0.ToString("D4"); // "0000"
1.ToString("D4"); // "0001"
http://msdn.microsoft.com/en-us/library/dwhawy9k.aspx
Demo: http://ideone.com/VlYBh
Upvotes: 2