ISet<T>.ExceptWith(IEnumerable<T>) 方法

定义

从当前集内移除指定集合中的所有元素。Removes all elements in the specified collection from the current set.

public:
 void ExceptWith(System::Collections::Generic::IEnumerable<T> ^ other);
public void ExceptWith (System.Collections.Generic.IEnumerable<T> other);
abstract member ExceptWith : seq<'T> -> unit
Public Sub ExceptWith (other As IEnumerable(Of T))

参数

other
IEnumerable<T>

要从集内移除的项的集合。The collection of items to remove from the set.

例外

othernullother is null.

注解

此方法是 O ( n )运算,其中 n 是参数中的元素数目 otherThis method is an O(n) operation, where n is the number of elements in the other parameter.

适用于