How to call delegate from string in C#?
问题 is it possible to call a delegate stored in a variable by its variable name (as a string)? i guess i'd have to use reflection mechanism, but i'm not getting anywhere example code: class Demo { public delegate int DemoDelegate(); private static int One() { return 1; } private static void CallDelegate(string name) { // somehow get the value of the variable with the name // stored in "name" and call the delegate using reflection } private static void CallDelegate(string name, DemoDelegate d) { d