SortedSet<T>.Remove(T) 方法

定義

SortedSet<T> 中移除指定項目。Removes a specified item from the SortedSet<T>.

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

參數

item
T

要移除的項目。The element to remove.

傳回

Boolean

如果找到並成功移除項目則為 true,否則為 falsetrue if the element is found and successfully removed; otherwise, false.

實作

備註

如果 SortedSet<T> 物件不包含指定的專案,則物件會維持不變,且不會擲回例外狀況。If the SortedSet<T> object does not contain the specified element, the object remains unchanged and no exception is thrown.

item 可以是 null 參考型別。item can be null for reference types.

這個方法是一項作業 O(log n)This method is an O(log n) operation.

適用於