HashSet<T>.IntersectWith(IEnumerable<T>) Yöntem
Tanım
Geçerli HashSet<T> nesneyi yalnızca bu nesnede ve belirtilen koleksiyonda bulunan öğeleri içerecek şekilde değiştirir.Modifies the current HashSet<T> object to contain only elements that are present in that object and in the specified collection.
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))
Parametreler
- other
- IEnumerable<T>
Geçerli nesneyle Karşılaştırılacak koleksiyon HashSet<T> .The collection to compare to the current HashSet<T> object.
Uygulamalar
- Öznitelikler
Özel durumlar
other
, null
değeridir.other
is null
.
Açıklamalar
Parametresi tarafından temsil edilen koleksiyon, other
HashSet<T> geçerli nesneyle aynı eşitlik karşılaştırıcısı olan bir koleksiyon ise HashSet<T> , bu yöntem bir O ( n
) işlemidir.If the collection represented by the other
parameter is a HashSet<T> collection with the same equality comparer as the current HashSet<T> object, this method is an O(n
) operation. Aksi takdirde, bu yöntem bir O ( n
+ m
) işlemidir; burada n
, Count ve m
içindeki öğe sayısıdır other
.Otherwise, this method is an O(n
+ m
) operation, where n
is Count and m
is the number of elements in other
.