Share via


PrivateType.InvokeStatic Method (String, array<Object )

Invokes static methods on the PrivateType.

Namespace:  Microsoft.VisualStudio.TestTools.UnitTesting
Assembly:  Microsoft.VisualStudio.QualityTools.UnitTestFramework (in Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll)

Syntax

'Declaration
Public Function InvokeStatic ( _
    name As String, _
    ParamArray args As Object() _
) As Object
public Object InvokeStatic(
    string name,
    params Object[] args
)
public:
Object^ InvokeStatic(
    String^ name, 
    ... array<Object^>^ args
)
member InvokeStatic : 
        name:string * 
        args:Object[] -> Object
public function InvokeStatic(
    name : String, 
    ... args : Object[]
) : Object

Parameters

  • name
    Type: String

    The name of the method to invoke.

  • args
    Type: array<Object[]

    Any array of arguments to pass

Return Value

Type: Object
An object that represents the invoked static method's return value, if any.

Exceptions

Exception Condition
ArgumentException

name is nulla null reference (Nothing in Visual Basic).

.NET Framework Security

See Also

Reference

PrivateType Class

InvokeStatic Overload

Microsoft.VisualStudio.TestTools.UnitTesting Namespace