Op Englesch liesen

Deelen iwwer


RouteValueDictionary.TryAdd(String, Object) Method

Definition

Attempts to the add the provided key and value to the dictionary.

C#
public bool TryAdd (string key, object value);
C#
public bool TryAdd (string key, object? value);

Parameters

key
String

The key.

value
Object

The value.

Returns

Returns true if the value was added. Returns false if the key was already present.

Applies to

Produkt Versiounen
ASP.NET Core 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0