NumberFormatInfo.CurrencyPositivePattern 屬性

定義

取得或設定正數貨幣值的格式模式。Gets or sets the format pattern for positive currency values.

public:
 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",其中 "$" 為 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.

適用於

另請參閱