AvaloniaDictionaryTKey, TValueAdd Method

Adds an element with the provided key and value to the IDictionaryTKey, TValue.

Definition

Namespace: Avalonia.Collections
Assembly: Avalonia.Base (in Avalonia.Base.dll) Version: 11.3.999
public void Add(
	TKey key,
	TValue value
)

Parameters

key  TKey
The object to use as the key of the element to add.
value  TValue
The object to use as the value of the element to add.

Implements

IDictionaryTKey, TValueAdd(TKey, TValue)

Exceptions

ArgumentNullExceptionkey is .
ArgumentExceptionAn element with the same key already exists in the IDictionaryTKey, TValue.
NotSupportedExceptionThe IDictionaryTKey, TValue is read-only.

See Also