Invoke Method

Calls a public method of a specified object or type.

Invoke Method Designer

Designer Properties#

  1. TargetType The target type to call a static method on. For instance methods, just leave this field as default (null).
  2. TargetObject The target object to call the public method on.
  3. MethodName The name of the public method to be called.

Properties#

Invoke Method Properties

Misc#

  1. Display Name The display name of the activity.
  2. GenericTypeArguments The generic type arguments for target object.
  3. MethodName The name of the public method to be called.
  4. Parameters The parameters for the method to be called.
  5. Result The out result after calling the method. It can be set to a variable which can be created under Variables tab at the bottom of the workflow designer.
  6. RunAsynchronously Checked when running the method asynchronously.
  7. TargetObject The target object to call the method on.
  8. TargetType The target type to call a static method on. For instance methods, just leave this field as default (null).

Example#

Call Replace on string

In this sample, we assign a string variable(myString) to "Test string 2021". Then using InvokeMethod we replace 2021 with ____, we assign it back to myString variable and display it with a MessageBox.