NumberFormatInfo.CurrencyPositivePattern 属性

定义

获取或设置正货币值的格式模式。

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

属性值

Int32

正货币值的格式模式。 InvariantInfo 的默认值是 0,它表示“$n”,其中“$”是 CurrencySymboln 是一个数字。

例外

该属性设置为一个小于 0 或大于 3 的值。

设置了该属性,但 NumberFormatInfo 对象为只读。

注解

CurrencyPositivePattern 属性与 "C" 标准格式字符串一起用于定义正货币值的模式。 有关详细信息,请参阅标准数值格式字符串。 此属性具有下表中的值之一。 符号 "$" 是 CurrencySymboln 是一个数字。

“值” 关联模式
0 $n
1 n $
2 $ n
3 n $

请注意,该模式不支持正号。

适用于

另请参阅