ExpandoObject.IDictionary<String,Object>.TryGetValue Méthode

Définition

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

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

Paramètres

key
String

Clé de la valeur à obtenir.

value
Object

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

Retours

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

S’applique à