Formatting a number to be zero-padded
int i = 3;Gives a value of "00003" as the string called "padded" - that simple.
string padded = string.Format("{0:5D", i);
int i = 3;Gives a value of "00003" as the string called "padded" - that simple.
string padded = string.Format("{0:5D", i);