Share via


InvokeMethod.MethodName Propiedad

Definición

El nombre del método que se va a invocar cuando se ejecute la actividad.

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

Valor de propiedad

El nombre del método.

Ejemplos

En el siguiente ejemplo de código se muestra cómo se establece la propiedad MethodName de una actividad de la clase InvokeMethod. Este ejemplo procede del ejemplo Uso de la actividad 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")
    }
},

Comentarios

El método invocado se debe declarar como público.

Se aplica a