I have some template string
this is my {0} template {1} string
which I plan to put user values in using String.Format()
.
The string actually is longer so for readability I use:
this is my {goodName1} template {goodName2} string
And then String.Replace
each parameter with its value.
How can I get the highest performance and readability?
Maybe I should not have this template in a file (as now) but dynamically build it by concatanating to a string builder and adding the params when required? Although it's less readable.
What's my other options?