ImmutableDictionary<TKey,TValue>.Builder.ContainsKey(TKey) 方法
定义
确定不可变字典是否包含具有指定键的元素。Determines whether the immutable dictionary contains an element that has the specified key.
public:
virtual bool ContainsKey(TKey key);
public bool ContainsKey (TKey key);
abstract member ContainsKey : 'Key -> bool
override this.ContainsKey : 'Key -> bool
Public Function ContainsKey (key As TKey) As Boolean
参数
- key
- TKey
要在字典中查找的键。The key to locate in the dictionary.
返回
如果字典包含具有该键的元素,则为 true;否则为 false。true if the dictionary contains an element with the key; otherwise, false.
实现
例外
key 为 null。key is null.