We in c # have the ability to form a string by pattern: string s = string.Format("Это текст: {0}", txt); or in the new version of string s = $"Это текст: {txt}"
How to make it possible to create a similar template for the user, and then use it in the code already?
For example:
string Name = "Максим"; string Age = "31"; string Street = "Красная"; The user in the Textbox sets the output template: "{Имя} живет на улице {Улица}" As a result, it should turn out: "Максим живет на улице Красная" That is, instead of {Name} I substitute Name, instead of {Street} - Street.
Replaceto disassemble what the user has entered and substitute - Grundy