{0} is a placeholder for the first object given; in this case that's filename, so it will insert whatever filename evaluates to in place of {0}. Similarly, of course you could use {1} and that would be replaced with the second parameter passed, etc.
{0} is a placeholder for the first object given; in this case that's filename, so it will insert whatever filename evaluates to in place of {0}. Similarly, of course you could use {1} and that would be replaced with the second parameter passed, etc.
{0} refers to the second parameter passed into String.Format. {1} refers to the third, {2} to the fourth, etc. For example:
String.Format("The {0} brown {1} jumps {2} the {3} dog.", "quick", "fox", "over", "lazy")
Evaluates to
"The quick brown fox jumps over the lazy dog."
Videos
The first 0 is the placeholder, means the first parameter.
00 is an actual format.
For example it could be like this:
var result = string.Format("{0:00} - {1:00}", 5, 6);
result will be 05 - 06. So the first 0 is means take the first parameter 5, while 1 means to take parameter 6.
The format is {index[,length][:formatString]}. Take a look at String.Format Method.
The first 0 in the following line is for the index of your argument
string.Format("{0:00}", int.Parse(testVal) + 1);
(int.Parse(testVal) + 1).ToString ("00") will yield the same thing.
string.Format supports multiple substitutions like this:
string.Format("{0:00} + 1 = {1:00}", int.Parse(testVal), int.Parse(testVal) + 1);