invokeMethod method

dynamic invokeMethod (dynamic obj, String name, List args)

Invokes an object method by its name with specified parameters.

  • obj an object to invoke.
  • name a name of the method to invoke.
  • args a list of method arguments. Returns the result of the method invocation or null if method returns void.