PrivateObject.GetProperty Method (String, array<Type[], array<Object )

Gets a property for a wrapped object identified by name.

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


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


  • name
    Type: String

    The name of property to get.

  • parameterTypes
    Type: array<Type[]

    An array of Type objects representing the number, order, and type of the parameters for the indexed property to get.

  • args
    Type: array<Object[]

    An array that contains the arguments to pass to the member to invoke.

Return Value

Type: Object
An object that contains the value of the property identified by name.


Exception Condition

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

.NET Framework Security

See Also


PrivateObject Class

GetProperty Overload

Microsoft.VisualStudio.TestTools.UnitTesting Namespace