ListBox.ObjectCollection.Contains(Object) 方法

定义

确定指定的项是否位于集合中。

public:
 virtual bool Contains(System::Object ^ value);
public:
 bool Contains(System::Object ^ value);
public bool Contains(object value);
abstract member Contains : obj -> bool
override this.Contains : obj -> bool
member this.Contains : obj -> bool
Public Function Contains (value As Object) As Boolean

参数

value
Object

一个对象,表示在集合中查找的项。

返回

true 如果项位于集合中,则为否则,为 false.

实现

例外

valuenull

注解

使用 Contains 该方法可以确定对象是否是集合的成员。 知道该项位于集合中后,可以使用 IndexOf 该方法确定项在集合中的位置。

适用于

另请参阅