SortedSet<T>.Overlaps(IEnumerable<T>) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
判斷目前 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元素數。