SortedSet<T>.Comparer 屬性

定義

取得 IComparer<T> 物件,這個物件可用來排序 SortedSet<T> 中的值。Gets the IComparer<T> object that is used to order the values in the SortedSet<T>.

public:
 property System::Collections::Generic::IComparer<T> ^ Comparer { System::Collections::Generic::IComparer<T> ^ get(); };
public System.Collections.Generic.IComparer<T> Comparer { get; }
member this.Comparer : System.Collections.Generic.IComparer<'T>
Public ReadOnly Property Comparer As IComparer(Of T)

屬性值

IComparer<T>

比較子,可用來排序 SortedSet<T> 中的值。The comparer that is used to order the values in the SortedSet<T>.

備註

傳回的比較子可以是的類型的預設比較子 SortedSet<T> ,或是用於其函式的比較子。The returned comparer can be either the default comparer of the type for a SortedSet<T>, or the comparer used for its constructor.

抓取這個屬性的值是一項作業 O(1)Retrieving the value of this property is an O(1) operation.

適用於