Condividi tramite


Proprietà LoadTestUserContext.Item

Ottiene o imposta un elemento LoadTestUserContext che dispone della chiave specificata.

Spazio dei nomi:  Microsoft.VisualStudio.TestTools.LoadTesting
Assembly:  Microsoft.VisualStudio.QualityTools.LoadTestFramework (in Microsoft.VisualStudio.QualityTools.LoadTestFramework.dll)

Sintassi

'Dichiarazione
Public Default Property Item ( _
    key As String _
) As Object
public Object this[
    string key
] { get; set; }
public:
virtual property Object^ default[String^ key] {
    Object^ get (String^ key) sealed;
    void set (String^ key, Object^ value) sealed;
}
abstract Item : 
        key:string -> Object with get, set 
override Item : 
        key:string -> Object with get, set
JScript non supporta le proprietà indicizzate.

Parametri

  • key
    Tipo: String

    Chiave dell'elemento da ottenere o impostare.

Valore proprietà

Tipo: Object
Elemento che dispone della chiave specificata.

Implementa

IDictionary.Item

Eccezioni

Eccezione Condizione
ArgumentNullException

key è nullriferimento null (Nothing in Visual Basic).

KeyNotFoundException

La proprietà viene recuperata e key non viene trovato.

NotSupportedException

La proprietà è impostata e l'interfaccia LoadTestUserContext è in sola lettura.

Sicurezza di .NET Framework

Vedere anche

Riferimenti

LoadTestUserContext Classe

Spazio dei nomi Microsoft.VisualStudio.TestTools.LoadTesting