HashSet<T>.IntersectWith(IEnumerable<T>) メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
現在の HashSet<T> オブジェクトを、そのオブジェクトおよび指定したコレクションに存在する要素のみを含むように変更します。
public:
virtual void IntersectWith(System::Collections::Generic::IEnumerable<T> ^ other);
public:
void IntersectWith(System::Collections::Generic::IEnumerable<T> ^ other);
public void IntersectWith(System.Collections.Generic.IEnumerable<T> other);
[System.Security.SecurityCritical]
public void IntersectWith(System.Collections.Generic.IEnumerable<T> other);
abstract member IntersectWith : seq<'T> -> unit
override this.IntersectWith : seq<'T> -> unit
[<System.Security.SecurityCritical>]
member this.IntersectWith : seq<'T> -> unit
[<System.Security.SecurityCritical>]
abstract member IntersectWith : seq<'T> -> unit
override this.IntersectWith : seq<'T> -> unit
Public Sub IntersectWith (other As IEnumerable(Of T))
パラメーター
- other
- IEnumerable<T>
現在の HashSet<T> オブジェクトと比較するコレクション。
実装
- 属性
例外
other は nullです。
注釈
other パラメーターで表されるコレクションが、現在のHashSet<T> オブジェクトと同じ等値比較子を持つHashSet<T> コレクションである場合、このメソッドは O(n) 操作です。 それ以外の場合、このメソッドは O(n + m) 操作であり、 n は Count され、 m は other内の要素の数です。