OrderedDictionary<TKey,TValue>.Remove 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
| 名称 | 说明 |
|---|---|
| Remove(TKey) |
从 中移除具有指定键的 IDictionary<TKey,TValue>元素。 |
| Remove(TKey, TValue) |
从 中移除具有指定键 OrderedDictionary<TKey,TValue> 的值,并将元素复制到值参数。 |
Remove(TKey)
- Source:
- OrderedDictionary.cs
- Source:
- OrderedDictionary.cs
- Source:
- OrderedDictionary.cs
从 中移除具有指定键的 IDictionary<TKey,TValue>元素。
public:
virtual bool Remove(TKey key);
public bool Remove(TKey key);
abstract member Remove : 'Key -> bool
override this.Remove : 'Key -> bool
Public Function Remove (key As TKey) As Boolean
参数
- key
- TKey
要删除的元素的键。
返回
true 如果已成功删除元素,则为 ;否则,为 false. 此方法还会返回false在原始key文件中找不到时IDictionary<TKey,TValue>。
实现
例外
key 是 null。
适用于
Remove(TKey, TValue)
- Source:
- OrderedDictionary.cs
- Source:
- OrderedDictionary.cs
- Source:
- OrderedDictionary.cs
从 中移除具有指定键 OrderedDictionary<TKey,TValue> 的值,并将元素复制到值参数。
public:
bool Remove(TKey key, [Runtime::InteropServices::Out] TValue % value);
public bool Remove(TKey key, out TValue value);
member this.Remove : 'Key * 'Value -> bool
Public Function Remove (key As TKey, ByRef value As TValue) As Boolean
参数
- key
- TKey
要删除的元素的键。
- value
- TValue
已删除的元素。
返回
true 如果成功找到并删除了元素,则为 ;否则,为 false.
例外
key 是 null。