RouteValueDictionary.TryAdd(String, Object) 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.
Tente d’ajouter le fourni key et value au dictionnaire.
public:
bool TryAdd(System::String ^ key, System::Object ^ value);
public bool TryAdd(string key, object? value);
public bool TryAdd(string key, object value);
member this.TryAdd : string * obj -> bool
Public Function TryAdd (key As String, value As Object) As Boolean
Paramètres
- key
- String
Clé.
- value
- Object
La valeur.
Retours
Retourne true si la valeur a été ajoutée. Retourne false si la clé était déjà présente.