InvokeMethod.GenericTypeArguments 屬性

定義

包含方法的通用型引數。

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

屬性值

爭吵。

範例

以下程式碼範例示範如何設定活動的 InvokeMethod GenericTypeArguments。 此範例來自 「使用 InvokeMethod 活動 」範例。

new InvokeMethod
{
    TargetObject = new InArgument<TestClass>(ctx => testClass),
    MethodName = "GenericInstanceMethod",
    GenericTypeArguments = { typeof(string) },
    Parameters =
    {
        new InArgument<string>("Hello world")
    }
},

備註

只有當被呼叫的方法是通用時,才必須設定泛型型別參數。

適用於