InvokeMethod.TargetType Property

.NET Framework (current version)

The type of the TargetObject.

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

public Type TargetType { get; set; }

Property Value

Type: System.Type

The target object type.

This parameter must only be set if the invoked method is static.

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

new InvokeMethod
    TargetType = typeof(Console),
    MethodName = "WriteLine",
    Parameters =
        new InArgument<string>(ctx => String.Format("....the stored value is {0}", resultValue.Get(ctx))),

.NET Framework
Available since 4.0
Return to top