.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
Post a Comment