Condividi tramite


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

ottiene una proprietà per un oggetto di cui è stato eseguito il wrapping identificato per nome.

Spazio dei nomi:  Microsoft.VisualStudio.TestTools.UnitTesting
Assembly:  Microsoft.VisualStudio.QualityTools.UnitTestFramework (in Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll)

Sintassi

'Dichiarazione
Public Function GetProperty ( _
    name As String, _
    parameterTypes As Type(), _
    args As Object() _
) As Object
public Object GetProperty(
    string name,
    Type[] parameterTypes,
    Object[] args
)
public:
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

Parametri

  • parameterTypes
    Tipo: array<System.Type[]
    una matrice di Type oggetti che rappresentano il numero, l'ordine e il tipo dei parametri della proprietà indicizzata di ottenere.
  • args
    Tipo: array<System.Object[]
    Una matrice contenente gli argomenti da passare al membro a invoke.

Valore restituito

Tipo: System.Object
Un oggetto che contiene il valore della proprietà ha identificato da name.

Eccezioni

Eccezione Condizione
ArgumentException

name viene nullriferimento null (Nothing in Visual Basic) o essere vuoto.

Sicurezza di .NET Framework

Vedere anche

Riferimenti

PrivateObject Classe

Overload GetProperty

Spazio dei nomi Microsoft.VisualStudio.TestTools.UnitTesting