HashSet<T>.IntersectWith(IEnumerable<T>) Método
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
Modifica o objeto atual HashSet<T> para conter apenas elementos presentes nesse objeto e na coleção especificada.
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))
Parâmetros
- other
- IEnumerable<T>
A coleção para comparar com o objeto atual HashSet<T> .
Implementações
- Atributos
Exceções
other é null.
Observações
Se a coleção representada pelo other parâmetro for uma HashSet<T> coleção com o mesmo comparador de igualdade do objeto atual HashSet<T> , este método é uma operação O(n). Caso contrário, este método é uma operação O(n + m), onde n é Count e m é o número de elementos em .other