Table of Contents

Method TryAdd

Namespace
DisCatSharp.Common
Assembly
DisCatSharp.Common.dll

TryAdd(string, TValue?)

Attempts to insert a specific key and corresponding value into this dictionary.

public bool TryAdd(string key, TValue? value)

Parameters

key string

Key to insert.

value TValue

Value corresponding to this key.

Returns

bool

Whether the operation was successful.

TryAdd(ReadOnlySpan<char>, TValue?)

Attempts to insert a specific key and corresponding value into this dictionary.

public bool TryAdd(ReadOnlySpan<char> key, TValue? value)

Parameters

key ReadOnlySpan<char>

Key to insert.

value TValue

Value corresponding to this key.

Returns

bool

Whether the operation was successful.