InvokeMethod() 공개 정적인 메소드

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.
리턴 object
예제 #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));
 }
예제 #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));
 }