using static System.Console;
using System.Collections.Generic;
public static void Main() {
var parametros = new List<Parametro>(){
Valor = "Programando em C#"
Valor = "preciso de ajuda!"
var texto = "Texto dinâmico {{parametro1}} , mais um pedaço do texto {{parametro2}}";
foreach (var item in parametros) {
texto = texto.Replace("{{" + item.Nome.Trim() + "}}", item.Valor);
WriteLine(texto.Interpolate(parametros));
public static class StringExt {
public static string Interpolate(this string text, List<Parametro> parameters) {
foreach (var item in parameters) {
text = text.Replace("{{" + item.Nome.Trim() + "}}", item.Valor);