ExpandoObject.IDictionary<String,Object>.TryGetValue Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
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 à
Commentaires
https://aka.ms/ContentUserFeedback.
Bientôt disponible : Tout au long de l’année 2024, nous abandonnerons progressivement le mécanisme de retour d’information GitHub Issues pour le remplacer par un nouveau système de commentaires. Pour plus d’informations, consultez :Soumettre et afficher des commentaires pour