PostSharp//API Reference/Post­Sharp.​Patterns.​Collections/Advisable­Dictionary<TKey, TValue>/Remove
Open sandboxFocus

Method Remove

Remove(TKey)

Removes the element with the specified key from the IDictionary<TKey,TValue>.

Declaration
public bool Remove(TKey key)
Parameters
Type Name Description
TKey key

The key of the element to remove.

Returns
Type Description
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>.

Exceptions
Type Condition
ArgumentNullException

key is null.

NotSupportedException

The IDictionary<TKey,TValue> is read-only.