Compartir a través de


RouteValueDictionary.TryAdd(String, Object) Método

Definición

Intenta agregar el proporcionado key y value al diccionario.

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

Parámetros

key
String

Clave.

value
Object

Valor.

Devoluciones

Devuelve true si se agregó el valor. Devuelve false si la clave ya estaba presente.

Se aplica a