InvokeMethod.TargetObject Property

.NET Framework (current version)

The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

The object that contains the method to execute.

Namespace:   System.Activities.Statements
Assembly:  System.Activities (in System.Activities.dll)

public InArgument TargetObject { get; set; }

Property Value

Type: System.Activities.InArgument

The object.

The following code sample demonstrates setting the TargetObject property of an InvokeMethod activity. This example is from the Using the InvokeMethod Activity sample.

new InvokeMethod
    TargetObject = new InArgument<TestClass>(ctx => testClass),
    MethodName = "AsyncMethodSample",
    RunAsynchronously = true,
    Parameters =
        new InArgument<string>("Hello async"),

.NET Framework
Available since 4.0
Return to top