IRequestCookieCollection.TryGetValue(String, String) Méthode

Définition

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

public:
 bool TryGetValue(System::String ^ key, [Runtime::InteropServices::Out] System::String ^ % value);
public bool TryGetValue (string key, out string value);
public bool TryGetValue (string key, out string? value);
abstract member TryGetValue : string * string -> bool
Public Function TryGetValue (key As String, ByRef value As String) As Boolean

Paramètres

key
String

Clé de la valeur à obtenir.

value
String

Clé de la valeur à obtenir. Quand cette méthode retourne une valeur, valeur associée à la clé spécifiée, si la clé est trouvée ; sinon, valeur par défaut du type du paramètre de valeur. Ce paramètre est passé sans être initialisé.

Retours

true si l’objet qui implémente IRequestCookieCollection contient un élément avec la clé spécifiée ; sinon, false.

Exceptions

key a la valeur null.

S’applique à