NumberFormatInfo.CurrencyPositivePattern 属性


获取或设置正货币值的格式模式。Gets or sets the format pattern for positive currency values.

 property int CurrencyPositivePattern { int get(); void set(int value); };
public int CurrencyPositivePattern { get; set; }
member this.CurrencyPositivePattern : int with get, set
Public Property CurrencyPositivePattern As Integer



正货币值的格式模式。The format pattern for positive currency values. InvariantInfo 的默认值是 0,它表示“$n”,其中“$”是 CurrencySymboln 是一个数字。The default for InvariantInfo is 0, which represents "$n", where "$" is the CurrencySymbol and n is a number.


该属性设置为一个小于 0 或大于 3 的值。The property is being set to a value that is less than 0 or greater than 3.

设置了该属性,但 NumberFormatInfo 对象为只读。The property is being set and the NumberFormatInfo object is read-only.


CurrencyPositivePattern 属性与 "C" 标准格式字符串一起用于定义正货币值的模式。The CurrencyPositivePattern property is used with the "C" standard format string to define pattern of positive currency values. 有关详细信息,请参阅标准数值格式字符串For more information, see Standard Numeric Format Strings. 此属性具有下表中的值之一。This property has one of the values in the following table. 符号 "$" 是 CurrencySymboln 是一个数字。The symbol "$" is the CurrencySymbol and n is a number.

“值”Value 关联模式Associated pattern
00 $n$n
11 n $n$
22 $ n$ n
33 n $n $

请注意,该模式不支持正号。Note that the pattern does not support a positive sign.