NumberFormatInfo.PercentPositivePattern 屬性


取得或設定正數百分比值的格式模式。Gets or sets the format pattern for positive percent values.

 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


正數百分比值的格式模式。The format pattern for positive percent values. InvariantInfo 的預設值為 0,代表 "n %",其中 "%" 為 PercentSymbol,而 n 為數值。The default for InvariantInfo is 0, which represents "n %", where "%" is the PercentSymbol 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.


PercentPositivePattern 屬性會與 "P" 標準格式字串搭配使用,以定義正百分比值的模式。The PercentPositivePattern property is used with the "P" standard format string to define pattern of positive percentage values. 如需詳細資訊,請參閱標準數值格式字串For more information, see Standard Numeric Format Strings. 此屬性具有下表中的其中一個值。This property has one of the values in the following table. 符號 "%" 是 PercentSymbol,而 n 是數位。The symbol "%" is the PercentSymbol and n is a number.

Value 關聯的模式Associated pattern
00 n %
11 n%
22 % n%n
33 % n% n