I need to create a very long string in a program, and have been using String.Format. The problem I am facing is keeping track of all the numbers when you have more than 8-10
not quite the same but sort of spoofing it... use an extension method, a dictionary and a little code:
something like this...
public static class Extensions {
public static string FormatX(this string format, params KeyValuePair [] values) {
string res = format;
foreach (KeyValuePair kvp in values) {
res = res.Replace(string.Format("{0}", kvp.Key), kvp.Value.ToString());
}
return res;
}
}