Hashtable.comparer 属性

定义

注意

Please use KeyComparer properties.

注意

Hashtable.comparer has been deprecated. Use the KeyComparer properties instead.

获取或设置要用于 IComparerHashtable

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("Hashtable.comparer has been deprecated. Use the KeyComparer properties instead.")]
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
[<System.Obsolete("Hashtable.comparer has been deprecated. Use the KeyComparer properties instead.")>]
member this.comparer : System.Collections.IComparer with get, set
member this.comparer : System.Collections.IComparer with get, set
Protected Property comparer As IComparer

属性值

要用于 IComparerHashtable

属性

例外

该属性被设置为某个值,但哈希表是使用 IEqualityComparer 创建的。

注解

检索此属性的值是一项 O(1) 操作。

适用于

另请参阅