Editare

Partajați prin


InvokeMethod.Parameters Property

Definition

The parameter collection of the method to be invoked.

public:
 property System::Collections::ObjectModel::Collection<System::Activities::Argument ^> ^ Parameters { System::Collections::ObjectModel::Collection<System::Activities::Argument ^> ^ get(); };
public System.Collections.ObjectModel.Collection<System.Activities.Argument> Parameters { get; }
member this.Parameters : System.Collections.ObjectModel.Collection<System.Activities.Argument>
Public ReadOnly Property Parameters As Collection(Of Argument)

Property Value

The parameter collection.

Examples

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

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")
    }
},

Remarks

The parameters must be added to the collection in the same order that they appear in the method signature. Parameters cannot be named TargetObject or Result.

Applies to