NumberFormatInfo 成员

根据区域性定义如何设置数值格式以及如何显示数值。

下表列出了由 NumberFormatInfo 类型公开的成员。

公共构造函数

  名称 说明
Public method Supported by the .NET Compact Framework NumberFormatInfo 初始化不依赖于区域性的(固定的)NumberFormatInfo 类的新可写实例。

页首

公共属性

  名称 说明
Public property Supported by the .NET Compact Framework CurrencyDecimalDigits 指示要在货币值中使用的小数位数。
Public property Supported by the .NET Compact Framework CurrencyDecimalSeparator 获取或设置要在货币值中用作小数点分隔符的字符串。
Public property Supported by the .NET Compact Framework CurrencyGroupSeparator 获取或设置在货币值中对小数点左边数字进行分组的字符串。
Public property Supported by the .NET Compact Framework CurrencyGroupSizes 获取或设置货币值中小数点左边每一组的位数。
Public property Supported by the .NET Compact Framework CurrencyNegativePattern 获取或设置负货币值的格式模式。
Public property Supported by the .NET Compact Framework CurrencyPositivePattern 获取或设置正货币值的格式模式。
Public property Supported by the .NET Compact Framework CurrencySymbol 获取或设置用作货币符号的字符串。
Public property Static Supported by the .NET Compact Framework CurrentInfo 获取基于当前区域性对值进行格式设置的只读 NumberFormatInfo
Public property DigitSubstitution 获取或设置用于指定图形用户界面如何显示数字形状的值。
Public property Static Supported by the .NET Compact Framework InvariantInfo 获取不依赖于区域性的(固定的)默认只读 NumberFormatInfo
Public property Supported by the .NET Compact Framework IsReadOnly 获取一个值,该值指示 NumberFormatInfo 是否为只读。
Public property Supported by the .NET Compact Framework NaNSymbol 获取或设置表示 IEEE NaN(非数字)值的字符串。
Public property NativeDigits 获取或设置与西文数字 0 到 9 等同的本机数字的字符串数组。
Public property Supported by the .NET Compact Framework NegativeInfinitySymbol 获取或设置表示负无穷大的字符串。
Public property Supported by the .NET Compact Framework NegativeSign 获取或设置表示关联数字是负值的字符串。
Public property Supported by the .NET Compact Framework NumberDecimalDigits 获取或设置在数值中使用的小数位数。
Public property Supported by the .NET Compact Framework NumberDecimalSeparator 获取或设置在数值中用作小数点分隔符的字符串。
Public property Supported by the .NET Compact Framework NumberGroupSeparator 获取或设置在数值中对小数点左边数字进行分组的字符串。
Public property Supported by the .NET Compact Framework NumberGroupSizes 获取或设置数值中小数点左边每一组的位数。
Public property Supported by the .NET Compact Framework NumberNegativePattern 获取或设置负数值的格式模式。
Public property Supported by the .NET Compact Framework PercentDecimalDigits 获取或设置在百分比值中使用的小数位数。
Public property Supported by the .NET Compact Framework PercentDecimalSeparator 获取或设置在百分比值中用作小数点分隔符的字符串。
Public property Supported by the .NET Compact Framework PercentGroupSeparator 获取或设置在百分比值中对小数点左边数字进行分组的字符串。
Public property Supported by the .NET Compact Framework PercentGroupSizes 获取或设置百分比值中小数点左边的每一组的位数。
Public property Supported by the .NET Compact Framework PercentNegativePattern 获取或设置负百分比值的格式模式。
Public property Supported by the .NET Compact Framework PercentPositivePattern 获取或设置正百分比值的格式模式。
Public property Supported by the .NET Compact Framework PercentSymbol 获取或设置用作百分比符号的字符串。
Public property Supported by the .NET Compact Framework PerMilleSymbol 获取或设置用作千分比符号的字符串。
Public property Supported by the .NET Compact Framework PositiveInfinitySymbol 获取或设置表示正无穷大的字符串。
Public property Supported by the .NET Compact Framework PositiveSign 获取或设置指示关联数字是正值的字符串。

页首

公共方法

  名称 说明
Public method Supported by the .NET Compact Framework Clone 创建 NumberFormatInfo 的浅表副本。
Public method Supported by the .NET Compact Framework Equals  已重载。 确定两个 Object 实例是否相等。 (从 Object 继承。)
Public method Supported by the .NET Compact Framework GetFormat 获取提供数字格式化服务的指定类型的对象。
Public method Supported by the .NET Compact Framework GetHashCode  用作特定类型的哈希函数。GetHashCode 适合在哈希算法和数据结构(如哈希表)中使用。 (从 Object 继承。)
Public method Static Supported by the .NET Compact Framework GetInstance 获取与指定 IFormatProvider 关联的 NumberFormatInfo
Public method Supported by the .NET Compact Framework GetType  获取当前实例的 Type。 (从 Object 继承。)
Public method Static Supported by the .NET Compact Framework ReadOnly 返回只读的 NumberFormatInfo 包装。
Public method Static Supported by the .NET Compact Framework ReferenceEquals  确定指定的 Object 实例是否是相同的实例。 (从 Object 继承。)
Public method Supported by the .NET Compact Framework ToString  返回表示当前 ObjectString。 (从 Object 继承。)

页首

请参见

参考

NumberFormatInfo 类
System.Globalization 命名空间
Decimal
CultureInfo 类

其他资源

格式化概述