ImmutableSortedSet<T>.IImmutableSet<T>.Intersect(IEnumerable<T>) 方法

定义

创建一个不可变集,其中包含同时存在于此集和指定集内的元素。Creates an immutable set that contains elements that exist in both this set and the specified set.

 virtual System::Collections::Immutable::IImmutableSet<T> ^ System.Collections.Immutable.IImmutableSet<T>.Intersect(System::Collections::Generic::IEnumerable<T> ^ other) = System::Collections::Immutable::IImmutableSet<T>::Intersect;
System.Collections.Immutable.IImmutableSet<T> IImmutableSet<T>.Intersect (System.Collections.Generic.IEnumerable<T> other);
abstract member System.Collections.Immutable.IImmutableSet<T>.Intersect : seq<'T> -> System.Collections.Immutable.IImmutableSet<'T>
override this.System.Collections.Immutable.IImmutableSet<T>.Intersect : seq<'T> -> System.Collections.Immutable.IImmutableSet<'T>
Function Intersect (other As IEnumerable(Of T)) As IImmutableSet(Of T) Implements IImmutableSet(Of T).Intersect

参数

other
IEnumerable<T>

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

返回

IImmutableSet<T>

一个新的不可变集,其中包含同时存在于两个集内的所有元素。A new immutable set that contains any elements that exist in both sets.

实现

注解

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

System.object NuGet 包System.Collections.Immutable NuGet package

关于不可变集合以及如何安装About immutable collections and how to install

适用于