PrivateType.InvokeStatic Method (String, BindingFlags, 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, _
    bindingFlags As BindingFlags, _
    ParamArray args As Object() _
) As Object
public Object InvokeStatic(
    string name,
    BindingFlags bindingFlags,
    params Object[] args
)
public:
Object^ InvokeStatic(
    String^ name, 
    BindingFlags bindingFlags, 
    ... array<Object^>^ args
)
member InvokeStatic : 
        name:string * 
        bindingFlags:BindingFlags * 
        args:Object[] -> Object
public function InvokeStatic(
    name : String, 
    bindingFlags : BindingFlags, 
    ... args : Object[]
) : Object

Parameters

  • name
    Type: String

    The name of the method to invoke.

  • bindingFlags
    Type: BindingFlags
  • 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