CallMethodIfImplemented() public static method

Uses reflection to dynamically invoke a method if that method is implemented on the target object.
public static CallMethodIfImplemented ( object obj, string method ) : object
obj object /// Object containing method. ///
method string /// Name of the method. ///
return object
Exemplo n.º 1
0
 /// <summary>
 /// Uses reflection to dynamically invoke a method
 /// if that method is implemented on the target object.
 /// </summary>
 /// <param name="method">
 /// Name of the method.
 /// </param>
 /// <param name="parameters">
 /// Parameters to pass to method.
 /// </param>
 public object CallMethodIfImplemented(string method, params object[] parameters)
 {
     return(MethodCaller.CallMethodIfImplemented(this.Instance, method, parameters));
 }
Exemplo n.º 2
0
 /// <summary>
 /// Uses reflection to dynamically invoke a method
 /// if that method is implemented on the target object.
 /// </summary>
 /// <param name="method">
 /// Name of the method.
 /// </param>
 public object CallMethodIfImplemented(string method)
 {
     return(MethodCaller.CallMethodIfImplemented(this.Instance, method));
 }