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

定义

修改当前集,使其仅包含指定集合中的元素。

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

参数

other
IEnumerable<T>

要与当前集进行比较的集合。

例外

othernull

注解

此方法忽略任何重复的元素。other

适用于