InvokeMethod() public static method

Call a method on an object with named arguments.
public static InvokeMethod ( Type type, object objectInstance, string methodName, object args, object>.Dictionary namedArgs = null ) : object
type System.Type Class to call the method on.
objectInstance object Object to call a method on.
methodName string Name of the method to call.
args object
namedArgs object>.Dictionary Named arguments of the method.
return object
Ejemplo n.º 1
0
 public static object InvokeStaticMethod(Type type, string methodName, object[] args, Dictionary <string, object> namedArgs = null)
 {
     return(VersionHandler.InvokeMethod(type, null, methodName, args, namedArgs));
 }
Ejemplo n.º 2
0
 public static object InvokeInstanceMethod(object objectInstance, string methodName, object[] args, Dictionary <string, object> namedArgs = null)
 {
     return(VersionHandler.InvokeMethod(objectInstance.GetType(), objectInstance, methodName, args, namedArgs));
 }