The {
n} refers to a format replacement token:
Code:
String.Format("{2} {1} {0}." , "Peter", "my name is", "Hello")
^ ^ ^ |_____| |__________| |_____|
| | |_________/ | |
| |________________________/ |
|________________________________________/
The format methods (String.Format, StringBuilder.AppendFormat) take 1, 2 or 3 "Object" arguments, or an array of objects. You can use more than three replacement tokens with the overload that accepts an array. The tokens can be anywhere in the format string, and can occur multiple times. The token doesn't have to be in the string, but if there is a token in the string, there must be an accompanying object (either in the 1-3 argument list, or in the array).
Peter
-------------------------
Work smarter, not harder