ReadOnlyDictionary<TKey,TValue>.KeyCollection.ICollection<TKey>.Contains(TKey) ReadOnlyDictionary<TKey,TValue>.KeyCollection.ICollection<TKey>.Contains(TKey) ReadOnlyDictionary<TKey,TValue>.KeyCollection.ICollection<TKey>.Contains(TKey) Method

定义

确定集合中是否包含特定值。Determines whether the collection contains a specific value.

 virtual bool System.Collections.Generic.ICollection<TKey>.Contains(TKey item) = System::Collections::Generic::ICollection<TKey>::Contains;
bool ICollection<TKey>.Contains (TKey item);
Function Contains (item As TKey) As Boolean Implements ICollection(Of TKey).Contains

参数

item
TKey TKey TKey

要在集合中定位的对象。The object to locate in the collection.

返回

如果在集合中找到 item,则为 true;否则为 falsetrue if item is found in the collection; otherwise, false.

实现

注解

此成员是显式接口成员的实现。This member is an explicit interface member implementation. 它只能在 ReadOnlyDictionary<TKey,TValue>.KeyCollection 实例被强制转换为 ICollection<T> 接口时使用。It can be used only when the ReadOnlyDictionary<TKey,TValue>.KeyCollection instance is cast to an ICollection<T> interface.

适用于