InvokeMethod.MethodName Proprietà

Definizione

Il nome del metodo da richiamare quando l'attività viene eseguita.

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

Valore della proprietà

Nome del metodo.

Esempio

Nell'esempio di codice riportato di seguito viene illustrata l'impostazione della proprietà MethodName di un'attività InvokeMethod. Questo esempio è tratto dall'esempio Using the 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")
    }
},

Commenti

Il metodo richiamato deve essere dichiarato pubblico.

Si applica a