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

定义

确定当前集是否与指定的集合重叠。Determines whether the current set overlaps with the specified collection.

public:
 bool Overlaps(System::Collections::Generic::IEnumerable<T> ^ other);
public bool Overlaps (System.Collections.Generic.IEnumerable<T> other);
abstract member Overlaps : seq<'T> -> bool
Public Function Overlaps (other As IEnumerable(Of T)) As Boolean

参数

other
IEnumerable<T>

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

返回

Boolean

如果当前集与 other 至少共享一个通用元素,则为 true;否则为 falsetrue if the current set and other share at least one common element; otherwise, false.

例外

othernullother is null.

注解

中的任何重复元素 other 都将被忽略。Any duplicate elements in other are ignored.

适用于