Compartir a través de


PrivateType.InvokeStatic (Método) (String, array<Type[], array<Object )

Invoca a métodos estáticos en el PrivateType.

Espacio de nombres:  Microsoft.VisualStudio.TestTools.UnitTesting
Ensamblado:  Microsoft.VisualStudio.QualityTools.UnitTestFramework (en Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll)

Sintaxis

'Declaración
Public Function InvokeStatic ( _
    name As String, _
    parameterTypes As Type(), _
    args As Object() _
) As Object
public Object InvokeStatic(
    string name,
    Type[] parameterTypes,
    Object[] args
)
public:
Object^ InvokeStatic(
    String^ name, 
    array<Type^>^ parameterTypes, 
    array<Object^>^ args
)
member InvokeStatic : 
        name:string * 
        parameterTypes:Type[] * 
        args:Object[] -> Object 
public function InvokeStatic(
    name : String, 
    parameterTypes : Type[], 
    args : Object[]
) : Object

Parámetros

  • name
    Tipo: System.String
    Nombre del método que se va a invocar.
  • parameterTypes
    Tipo: array<System.Type[]
    Matriz de objetos Type que representa el número, orden y tipo de parámetros para el método.
    O bien
    Una matriz vacía de tipo Type, es decir, Type[] types = new Type[0] para obtener un método que no lleve parámetros.
  • args
    Tipo: array<System.Object[]
    Una matriz de argumentos que se pasan

Valor devuelto

Tipo: System.Object
Objeto que representa el valor devuelto por el método estático invocado, si lo hay.

Excepciones

Excepción Condición
ArgumentException

El valor de name es nullreferencia null (Nothing en Visual Basic).

Seguridad de .NET Framework

Vea también

Referencia

PrivateType Clase

InvokeStatic (Sobrecarga)

Microsoft.VisualStudio.TestTools.UnitTesting (Espacio de nombres)