Share via


InvokeMethod 构造函数

定义

创建 InvokeMethod 类的新实例。

public:
 InvokeMethod();
public InvokeMethod ();
Public Sub New ()

示例

下面的代码示例演示如何创建 InvokeMethod 活动。 此示例摘自 使用 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")
    }
},

适用于