C# can format a string e.g. $"string {a} {b} {c}" to substitute the variables a, b and c into the string.
var a = "string1";
var b = "string2";
var c = "string3";
var d = $"string {a} {b} {c}"; // become "string string1 string2 string3"
Is is possible to store the format string to a variable so that I can create the string template dynamically.
var a = "string1";
var b = "string2";
var c = "string3";
var template = "string {a} {b} {c}";
var d = $template; // Can I do this?
Thank you!
string.Replacee.g.template.Replace("{a}", a).Replace("{b}", b).Replace("{c}", c)