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

定义

修改当前集,使该集仅包含也存在在指定集合中的元素。Modifies the current set so that it contains only elements that are also in a specified collection.

 virtual void System.Collections.Generic.ISet<T>.IntersectWith(System::Collections::Generic::IEnumerable<T> ^ other) = System::Collections::Generic::ISet<T>::IntersectWith;
void ISet<T>.IntersectWith (System.Collections.Generic.IEnumerable<T> other);
Sub IntersectWith (other As IEnumerable(Of T)) Implements ISet(Of T).IntersectWith

参数

other
IEnumerable<T>

要与当前集合进行比较的集合。The collection to compare to the current collection.

实现

注解

此成员是显式接口成员实现。This member is an explicit interface member implementation. 它只能在 ImmutableHashSet<T> 实例被强制转换为 ISet<T> 接口时使用。It can be used only when the ImmutableHashSet<T> instance is cast to an ISet<T> interface.

适用于