Collection<T>.IList.Contains(Object) 方法
定义
virtual bool System.Collections.IList.Contains(System::Object ^ value) = System::Collections::IList::Contains;
bool IList.Contains (object value);
abstract member System.Collections.IList.Contains : obj -> bool
override this.System.Collections.IList.Contains : obj -> bool
Function Contains (value As Object) As Boolean Implements IList.Contains
参数
返回
如果在 IList 中找到了 Object,则为 true;否则为 false。true if the Object is found in the IList; otherwise, false.
实现
例外
注解
此方法通过首先确定是否 value 为类型 T (或 null) ,然后调用来确定相等性 Contains 。This method determines equality by first determining whether value is of type T (or null) and then calling Contains.
此方法是 O (n) 操作,其中 n 是 Count 。This method is an O(n) operation, where n is Count.