using System.Reflection;
Here we create a instance of the class and gets a method instance using the GetMethod method. The Invoke method executes the method.
classdemo
c1 = new classdemo();
MethodInfo
mi = typeof(classdemo).GetMethod("functionname_in_string_format");
mi.Invoke(c1, null);

Join the conversation! Your thoughts help the community grow.