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> 개체와 비교할 컬렉션입니다.

구현

특성

예외

othernull입니다.

설명

매개 변수가 other 나타내는 컬렉션이 HashSet<T> 현재 HashSet<T> 개체와 같은 비교자를 가진 컬렉션인 경우 이 메서드는 O(n) 연산입니다. 그렇지 않으면 이 메서드는 O(n + m) 연산이며 Count 여기서 n 는 요소other의 수입니다.m

적용 대상