RouteValueDictionary.TryAdd(String, Object) Metodo

Definizione

Tenta di aggiungere l'oggetto fornito key e value al dizionario.

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

Parametri

key
String

Chiave.

value
Object

Valore.

Restituisce

Restituisce true se il valore è stato aggiunto. Restituisce false se la chiave era già presente.

Si applica a