Hello,
As way to work with such stuff you just can use reflection.
<pre>
using System.Reflection;
int ni = 1;
Type _type = this.GetType();
MethodInfo _method = _type.GetMethod("ExecStringToFunction");
if (_method != null) _method.Invoke(this, new object[] { ni });
Here I look the function in local space and execute it with the parameter.
You just need to make the parser or use some of existing one which will parse function name and arguments. Ah also don't forget abt permissions.
For all debators who wonder what for that functionality can be necessary, and it not design or some other things. For example: I did huge library which can be extended with runtime scripts which were compiled at runtime. So I use C# or VB.NET as a script for extending library functionality. Example 3: I load assembly manually and check for method at runtime not as a referenced assembly - this for .NET plugins development (this way also you can call a managed exe methods); Example 3: have class with the huge structure with a variable number of properties and can be any number of substructures as property value - here is also better to use reflection to extract property name as type and call the method based on it.
Also, for debators, the question was asked correctly, why are you making discussion from that place?
If you don't know how to make it just do not post the solution. Or you just gaining your reputation via posting answers without any information or making comments that "your question is not correct" or something like that? Maybe you just start reading the books to give the good answers for others?
Regards,
Maxim.