Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Collections Namespace / Advisable­Dictionary(TKey, TValue) Class / Advisable­Dictionary(TKey, TValue) Methods / Advisable­Dictionary(TKey, TValue).​Remove Method

AdvisableDictionary<TKey, TValue>.Remove Method

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

Namespace:  PostSharp.Patterns.Collections
Assembly:  PostSharp.Patterns.Common (in PostSharp.Patterns.Common.dll) Version: 5.0.43.0 (5.0.43.0)
Syntax
C#
public bool Remove(
	TKey key
)

Parameters

key
Type: TKey
The key of the element to remove.

Return Value

Type: 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
ExceptionCondition
ArgumentNullExceptionkey is null.
NotSupportedExceptionThe IDictionary<TKey, TValue> is read-only.
See Also