int max = 100; for (int i = 1; i <= max; i++) { string myString = string.Format("reg{0:000}", i); // do something with the string }
reg001<br /> reg002<br /> ...<br /> reg013<br /> reg014<br /> ...<br /> reg100
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)