Table of Contents

Method TryAdd

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

TryAdd(TKey, TValue)

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

public bool TryAdd(TKey key, TValue value)

Parameters

key TKey

The key of the element to add.

value TValue

The value of the element to add. It can be null.

Returns

bool

true if the key/value pair was added to the dictionary successfully; otherwise, false.