Condividi tramite


PrivateObject.Invoke Method (String, array<Object )

Used to access the members of the private object.

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

Syntax

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

Parameters

  • name
    Type: String

    The name of the member to invoke.

  • args
    Type: array<Object[]

    Any arguments that the member requires.

Return Value

Type: Object
An object that represents the return value of a private member.

Remarks

If the private member does not return a reference or value, then this method will not return an object.

.NET Framework Security

See Also

Reference

PrivateObject Class

Invoke Overload

Microsoft.VisualStudio.TestTools.UnitTesting Namespace