InvokeMethod.TargetType 屬性

定義

TargetObject 的類型。

public:
 property Type ^ TargetType { Type ^ get(); void set(Type ^ value); };
public Type TargetType { get; set; }
member this.TargetType : Type with get, set
Public Property TargetType As Type

屬性值

目標物件型別。

範例

下列程式碼範例將示範如何設定 InvokeMethod 活動的 TargetType 屬性。 此範例來自 使用 InvokeMethod 活動 範例。

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

備註

只有當叫用的方法是靜態方法時,才必須設定此參數。

適用於