ConcurrentDictionary<TKey,TValue>.IDictionary<TKey,TValue>.Remove 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
从 中移除具有指定键的 IDictionary<TKey,TValue>元素。
virtual bool System.Collections.Generic.IDictionary<TKey,TValue>.Remove(TKey key) = System::Collections::Generic::IDictionary<TKey, TValue>::Remove;
bool IDictionary<TKey,TValue>.Remove(TKey key);
abstract member System.Collections.Generic.IDictionary<TKey,TValue>.Remove : 'Key -> bool
override this.System.Collections.Generic.IDictionary<TKey,TValue>.Remove : 'Key -> bool
Function Remove (key As TKey) As Boolean Implements IDictionary(Of TKey, TValue).Remove
参数
- key
- TKey
要删除的元素的键。
返回
true 如果已成功删除元素,则为 ;否则,为 false. 此方法还会返回false在原始IDictionary<TKey,TValue>文件中找不到时key。
实现
例外
key 是 null。