NumberFormatInfo.PercentPositivePattern 屬性

定義

取得或設定正數百分比值的格式模式。

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

屬性值

Int32

正數百分比值的格式模式。 InvariantInfo 的預設值為 0,代表 "n %",其中 "%" 為 PercentSymbol,而 n 為數值。

例外狀況

屬性已設定為小於 0 或大於 3 的值。

正在設定屬性,而且 NumberFormatInfo 物件為唯讀。

備註

PercentPositivePattern屬性會搭配 "P" 標準格式字串使用,以定義正百分比值的模式。 如需詳細資訊,請參閱標準數值格式字串。 這個屬性具有下表中的其中一個值。 符號 "%" 為 PercentSymbol ,而 n 為數字。

相關聯的模式
0 n-1
1 n-1
2 % n
3 % n

適用於

另請參閱