When using String.Format, you use {0}, {1}, {2}, etc. to reference the variables to place in the string, for example:
string s = String.Format("{0} {1}", "Like", "this.");
Is there any way that I can use string values instead of integers inside the curly braces. So that the input string would be:
"{word1} {word2}"
I am doing this because I have a long text file with areas which need to be filled in. There are too many areas to have an ordered list of variables to place and variables could be repeated.
So how could I use a method similar to String.Format using string names instead of using an index?