SynchronizedReadOnlyCollection<T>.Contains(T) SynchronizedReadOnlyCollection<T>.Contains(T) SynchronizedReadOnlyCollection<T>.Contains(T) SynchronizedReadOnlyCollection<T>.Contains(T) Method

定义

确定集合是否包含具有特定值的元素。Determines whether the collection contains an element with a specific value.

public:
 virtual bool Contains(T value);
public bool Contains (T value);
abstract member Contains : 'T -> bool
override this.Contains : 'T -> bool
Public Function Contains (value As T) As Boolean

参数

value
T T T T

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

返回

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

实现

异常

value 不是集合所含类型的对象。value is not an object of the type contained in the collection.

适用于