I am trying to develop a template engine in c# and in my concept I will need to read to read methods as well as parameters from text files.This shows something could be done , but it does not work if the parameter is also read from the text.Is there a way to achieve this?
private static void Main(string[] args)
{
string returnValue = Execute("AMethod(\"Hello\")");
//the result in retunValue is same as from code commented below:
// string returnValue= AMethod("Hello");
}
public static string AMethod(string parameter)
{
return "xyz" + parameter;
}
The problem here is how to write the Execute Method