ReadOnlyDictionary<TKey,TValue>.KeyCollection.ICollection<TKey>.Contains 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
确定集合是否包含特定值。
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>,才能使用它。