I am sure this question has been answered somewhere but I'm having major problems finding the right combination of keywords to find it.
I am curious to know if its possible to do something like this:
dynamic someObj = new SomeObject();
var methodName = "someMethodName";
// execute methodName on someObj
I basically want to know if its possible to execute a method on a dynamic object using a variable that stores the methods name.
object
is the name of the C# alias for theSystem.Object
class; you should rename it to, say,obj
. – Sergey Kalinichenko Jun 14 '12 at 22:52