# Invoke Method

> `System.Activities.Statements.InvokeMethod`

`System.Activities.Statements.InvokeMethod`

**Invoke Method** calls a public method of a specified object or type — instance methods on a target object, or static methods on a target type — optionally passing arguments and returning a result.

## Project compatibility

**Windows - Legacy** | **Windows**

## Configuration

| Parameter | Description |
| --- | --- |
| **TargetObject** | The object whose method is invoked. Used for instance methods. Leave empty when invoking a static method. |
| **TargetType** | The type whose static method is invoked. Used for static methods. Leave empty when invoking an instance method. |
| **MethodName** | The name of the public method to invoke. |
| **Parameters** | The collection of input and output arguments passed to the method, in the order required by the method signature. |
| **GenericTypeArguments** | The collection of generic type arguments for the method, when the method is generic. |
| **Result** | The value returned by the method, when any. |
| **RunAsynchronously** | When selected, the method is invoked asynchronously. |

## Properties

### Common

| Parameter | Description |
| --- | --- |
| **DisplayName** | The display name of the activity. |

### Misc

| Parameter | Description |
| --- | --- |
| **Private** | When selected, the values of variables and arguments are no longer logged at Verbose level. |

This activity is built by Microsoft. For more information, see [their official documentation](https://learn.microsoft.com/en-us/dotnet/api/system.activities.statements.invokemethod?view=netframework-4.8.1).
