.net - Calling a function from a string in C# -


i know in php able make call like:

$function_name = 'hello'; $function_name();  function hello() { echo 'hello'; } 

is possible in .net?

yes. can use reflection. this:

type thistype = this.gettype(); methodinfo themethod = thistype.getmethod(thecommandstring); themethod.invoke(this, userparameters); 

Comments

Popular posts from this blog

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -

minify - Minimizing css files -