Array.IList.Contains(Object) Method

Definition

判斷某項目是否在 IList 中。Determines whether an element is in the IList.

 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

Parameters

value
Object

要在目前清單中尋找的物件。The object to locate in the current list. 對於參考類型而言,要尋找的項目可以是 nullThe element to locate can be null for reference types.

Returns

Boolean

如果在 true 中找到 value,則為 IList,否則為 falsetrue if value is found in the IList; otherwise, false.

Implements

Remarks

這個成員是明確的介面成員實作。This member is an explicit interface member implementation. 只有在 Array 執行個體轉換成 IList 介面時,才能使用這個成員。It can be used only when the Array instance is cast to an IList interface.

Applies to