HashSet<T>.CreateSetComparer 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
回傳 IEqualityComparer 一個可用於物件等性測試 HashSet<T> 的物件。
public:
static System::Collections::Generic::IEqualityComparer<System::Collections::Generic::HashSet<T> ^> ^ CreateSetComparer();
public static System.Collections.Generic.IEqualityComparer<System.Collections.Generic.HashSet<T>> CreateSetComparer();
static member CreateSetComparer : unit -> System.Collections.Generic.IEqualityComparer<System.Collections.Generic.HashSet<'T>>
Public Shared Function CreateSetComparer () As IEqualityComparer(Of HashSet(Of T))
傳回
一個 IEqualityComparer 可用於深度等式測試的 HashSet<T> 物件。
備註
該 IEqualityComparer 物件只在一個層級檢查相等性;不過,你可以串連其他層級的比較器,進行更深入的等性測試。
呼叫此方法需操作 O(1)。