Share via


NameScope.TryGetValue(String, Object) Méthode

Définition

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

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

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, un objet null. Ce paramètre est passé sans être initialisé.

Retours

Boolean

true si le NameScope contient un mappage pour le nom fourni en tant que key. Sinon, false.

S’applique à