Share via


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

注解

只有当调用的方法为泛型时,才必须设置这些泛型类型参数。

适用于