Skip to main content

Remove Method

Removes the element with the specified key from the IDictionary(TKey, TValue).

Definition

Namespace: Avalonia.Collections
Assembly: Avalonia.Base (in Avalonia.Base.dll)

public bool Remove(
TKey key
)

Parameters

  TKey
The key of the element to remove.

Return Value

Boolean
true if the element is successfully removed; otherwise, false. This method also returns false if key was not found in the original IDictionary(TKey, TValue).

Implements

IDictionary(TKey, TValue).Remove(TKey)

Exceptions

ArgumentNullExceptionkey is null.
NotSupportedExceptionThe IDictionary(TKey, TValue) is read-only.

See Also

Reference

AvaloniaDictionary(TKey, TValue) Class
Avalonia.Collections Namespace