InvokeMethod.MethodName 屬性

定義

活動執行時要叫用之方法的名稱。

public:
 property System::String ^ MethodName { System::String ^ get(); void set(System::String ^ value); };
public string MethodName { get; set; }
member this.MethodName : string with get, set
Public Property MethodName As String

屬性值

String

方法名稱。

範例

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

new InvokeMethod
{
    TargetObject = new InArgument<TestClass>(ctx => testClass),
    MethodName = "InstanceMethod",
    Parameters =
    {
        new InArgument<string>("My favorite number is"),
        new InArgument<int>(42),
        new InArgument<string>("first item of the param array"),
        new InArgument<string>("second item of the param array"),
        new InArgument<string>("third item of the param array")
    }
},

備註

所叫用的方法必須宣告為公用。

適用於