InvokeMethod.GenericTypeArguments 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
包含方法的通用型引數。
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")
}
},
備註
只有當被呼叫的方法是通用時,才必須設定泛型型別參數。