×
Home About Us Products Services News Free Scripts Contact
news php scripts and software

C# (C Sharp) example - Invoke a method with Reflection


C# (C Sharp) - Invoke a method with Reflection

// dynamically create or activate(if exist) object
object obj = Activator.CreateInstance(strType);

// get required method by specifying name
MethodInfo mi = typ.GetMethod(strMethodName);
mi.Invoke(0, null);

Category: C# (C Sharp)

 
<< Go back