Langue

AdditionalPropertiesDictionary<TValue>.IDictionary<String,TValue>.TryGetValue Méthode

Définition

Obtient la valeur associée à la clé spécifiée.

 virtual bool System.Collections.Generic.IDictionary<System.String,TValue>.TryGetValue(System::String ^ key, [Runtime::InteropServices::Out] TValue % value) = System::Collections::Generic::IDictionary<System::String ^, TValue>::TryGetValue;
bool IDictionary<string,TValue>.TryGetValue(string key, out TValue value);
abstract member System.Collections.Generic.IDictionary<System.String,TValue>.TryGetValue : string * 'Value -> bool
override this.System.Collections.Generic.IDictionary<System.String,TValue>.TryGetValue : string * 'Value -> bool
Function TryGetValue (key As String, ByRef value As TValue) As Boolean Implements IDictionary(Of String, TValue).TryGetValue

Paramètres

key
String

Clé dont la valeur doit être obtenu.

value
TValue

Lorsque cette méthode est retournée, la valeur associée à la clé spécifiée, si la clé est trouvée ; sinon, valeur par défaut pour le type du value paramètre. Ce paramètre est passé non initialisé.

Retours

true si l’objet qui implémente IDictionary<TKey,TValue> contient un élément avec la clé spécifiée ; sinon, false.

Implémente

S’applique à