Hashtable.comparer 屬性

定義

警告

Please use KeyComparer properties.

取得或設定 IComparer 所使用的 HashtableGets or sets the IComparer to use for the Hashtable.

protected:
 property System::Collections::IComparer ^ comparer { System::Collections::IComparer ^ get(); void set(System::Collections::IComparer ^ value); };
[System.Obsolete("Please use KeyComparer properties.")]
protected System.Collections.IComparer? comparer { get; set; }
[System.Obsolete("Please use KeyComparer properties.")]
protected System.Collections.IComparer comparer { get; set; }
protected System.Collections.IComparer comparer { get; set; }
[<System.Obsolete("Please use KeyComparer properties.")>]
member this.comparer : System.Collections.IComparer with get, set
member this.comparer : System.Collections.IComparer with get, set
Protected Property comparer As IComparer

屬性值

IComparer

IComparer 所使用的 HashtableThe IComparer to use for the Hashtable.

屬性

例外狀況

屬性設為值,但使用 IEqualityComparer 建立雜湊資料表。The property is set to a value, but the hash table was created using an IEqualityComparer.

備註

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

適用於

另請參閱