語言

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

定義

判斷目前 SortedSet<T> 物件與特定集合是否有共通元素。

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

參數

other
IEnumerable<T>

將收藏與當前 SortedSet<T> 物件做比較。

傳回

true若SortedSet<T>物件與other至少共享一個共同元素;否則,。 false

實作

例外狀況

other 是 null。

備註

任何重複元素 other 都被忽略。

此方法是一個 O(n log m) 運算,其中 m 是 Count ,是 n 中的 other元素數。

適用於