CultureAndRegionInfoBuilder.CompareInfo 属性
定义
获取或设置用来定义如何根据区域性比较字符串的 CompareInfo 对象。Gets or sets the CompareInfo object that defines how to compare strings for the culture.
public:
property System::Globalization::CompareInfo ^ CompareInfo { System::Globalization::CompareInfo ^ get(); void set(System::Globalization::CompareInfo ^ value); };
public System.Globalization.CompareInfo CompareInfo { get; set; }
member this.CompareInfo : System.Globalization.CompareInfo with get, set
Public Property CompareInfo As CompareInfo
属性值
用来定义如何根据区域性比较字符串的 CompareInfo 对象。The CompareInfo object that defines how to compare strings for the culture.
例外
在设置操作中,指定的值为 null。In a set operation the assigned value is null.
此自定义区域性是对内置区域性的重写。This custom culture is an override of a built-in culture.
注解
CultureAndRegionInfoBuilder.CompareInfo属性对应于 CultureInfo.CompareInfo 属性。The CultureAndRegionInfoBuilder.CompareInfo property corresponds to the CultureInfo.CompareInfo property.
TextInfo CompareInfo 分配给和属性的和对象 TextInfo CompareInfo 都支持区分区域性和区分大小写的字符串比较。The TextInfo and CompareInfo objects that are assigned to the TextInfo and CompareInfo properties both support culture-sensitive and case-sensitive string comparison. CompareInfo对象还具有一些方法,这些方法包括 CompareOptions 支持区分区域性、不区分大小写的参数。The CompareInfo object also has methods that include a CompareOptions parameter that supports culture-sensitive, case-insensitive comparison. 应分配这两个属性 TextInfo ,并指定 CompareInfo 表示相同区域设置的对象。These two properties should be assigned TextInfo and CompareInfo objects that represent the same locale.