NumberFormatInfo.CurrencyPositivePattern Property


取得或設定正數貨幣值的格式模式。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

Property Value


正數貨幣值的格式模式。The format pattern for positive currency values. InvariantInfo 的預設值為 0,代表 "$n",其中 "$" 為 CurrencySymbol,而 n 為數值。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. 符號 "$" 是 CurrencySymbol,而 n 是數位。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.

Applies to

See also