The correct solution should look like this.
StringTemplate st = new StringTemplate("$msg$"); st.SetAttribute("msg", new StringTemplate("Hello $usr$")); st.SetAttribute("usr", "Jakub"); Console.WriteLine(st); // current output: "Hello Jakub" // expected output: "Hello Jakub"
Next time I will ask twice. I promise: -)
source share