Collection<T>.IList.Remove(Object) 方法

定義

IList 移除特定物件之第一個符合的元素。

 virtual void System.Collections.IList.Remove(System::Object ^ value) = System::Collections::IList::Remove;
void IList.Remove (object value);
abstract member System.Collections.IList.Remove : obj -> unit
override this.System.Collections.IList.Remove : obj -> unit
Sub Remove (value As Object) Implements IList.Remove

參數

value
Object

要從 Object 移除的 IList

實作

例外狀況

value 所屬類型無法指派給 IList

備註

這個方法會使用預設比較子 Comparer<T>.Default來判斷相等。 Comparer<T>.Default 會檢查類型 T 是否實作 System.IComparable<T> ,並在可用時使用該實作。 如果沒有檢查 Comparer<T>.Default 類型 T 是否實作 System.IComparable。 如果類型 T 未實作任一介面,這個方法會使用 Object.Equals

這個方法是 O (n) 作業,其中 nCount

適用於