PrivateType.InvokeStatic 方法 (String, array<Type[], array<Object[], array<Type )

调用 PrivateType 上的静态方法。

命名空间:  Microsoft.VisualStudio.TestTools.UnitTesting
程序集:  Microsoft.VisualStudio.QualityTools.UnitTestFramework(在 Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll 中)

语法

声明
Public Function InvokeStatic ( _
    name As String, _
    parameterTypes As Type(), _
    args As Object(), _
    typeArguments As Type() _
) As Object
public Object InvokeStatic(
    string name,
    Type[] parameterTypes,
    Object[] args,
    Type[] typeArguments
)
public:
Object^ InvokeStatic(
    String^ name, 
    array<Type^>^ parameterTypes, 
    array<Object^>^ args, 
    array<Type^>^ typeArguments
)
member InvokeStatic : 
        name:string * 
        parameterTypes:Type[] * 
        args:Object[] * 
        typeArguments:Type[] -> Object 
public function InvokeStatic(
    name : String, 
    parameterTypes : Type[], 
    args : Object[], 
    typeArguments : Type[]
) : Object

参数

  • parameterTypes
    类型:array<System.Type[]
    一个 Type 对象数组,表示方法的参数的数目、顺序和类型。
    - 或 -
    类型 Type 的空数组(即 Type[] types = new Type[0]),用于获取不带参数的方法。
  • args
    类型:array<System.Object[]
    要传递的参数的数组。
  • typeArguments
    类型:array<System.Type[]
    一个要在调用泛型方法时使用的类型参数数组。

返回值

类型:System.Object

.NET Framework 安全性

请参见

参考

PrivateType 类

InvokeStatic 重载

Microsoft.VisualStudio.TestTools.UnitTesting 命名空间