I want to create a string template, part of its content will be completed lately
string myTemplete = "This is a template ,which depends on {1} and {2} and {3}"
After that I have some functions calls chain and I collect the data from them
int arg1 = MyFunc1();
string arg2 = MyFunc2();
string arg3 = MyFunc3();
// need to populate the myTemplete with arg 1
for {0}
, arg2 for {1}
, arg3
for {2}
How can I do it? The template I build is long and in used in many places so don`t want to make something like that
int arg1 = MyFunc1();
string arg2 = MyFunc2();
string arg3 = MyFunc3();
string myData = string.Format("This is a template ,which depends on {1} and {2} and {3}"
,arg1, arg2, arg3);