HashSet<T>.IntersectWith(IEnumerable<T>) 메서드

정의

현재 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) 작업입니다. 여기서 nCount 의 요소 other수와 m 입니다.

적용 대상