ReadOnlyDictionary<TKey,TValue>.KeyCollection.ICollection<TKey>.Contains 方法

定义

确定集合是否包含特定值。

 virtual bool System.Collections.Generic.ICollection<TKey>.Contains(TKey item) = System::Collections::Generic::ICollection<TKey>::Contains;
bool ICollection<TKey>.Contains(TKey item);
abstract member System.Collections.Generic.ICollection<TKey>.Contains : 'Key -> bool
override this.System.Collections.Generic.ICollection<TKey>.Contains : 'Key -> bool
Function Contains (item As TKey) As Boolean Implements ICollection(Of TKey).Contains

参数

item
TKey

要定位在集合中的对象。

返回

true 如果在 item 集合中找到,则为 ;否则为 false

实现

注解

此成员是显式接口成员实现。 仅当实例强制转换为ReadOnlyDictionary<TKey,TValue>.KeyCollection接口时ICollection<T>,才能使用它。

适用于