This documentation is archived and is not being maintained.

NumberFormatInfo.PercentNegativePattern Property

Gets or sets the format pattern for negative percent values.

[Visual Basic]
Public Property PercentNegativePattern As Integer
public int PercentNegativePattern {get; set;}
public: __property int get_PercentNegativePattern();
public: __property void set_PercentNegativePattern(int);
public function get PercentNegativePattern() : int;
public function set PercentNegativePattern(int);

Property Value

The format pattern for negative percent values. The default for InvariantInfo is 0, which represents "-n %", where "%" is the PercentSymbol and n is a number.


Exception Type Condition
ArgumentOutOfRangeException The property is being set to a value that is less than 0 or greater than 2.
InvalidOperationException The property is being set and the NumberFormatInfo is read-only.


This property can have one of the values in the following table. The symbol "%" is the PercentSymbol, the symbol "-" is the NegativeSign, and n is a number.

Value Associated Pattern
0 -n %
1 -n%
2 -%n


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework, Common Language Infrastructure (CLI) Standard

See Also

NumberFormatInfo Class | NumberFormatInfo Members | System.Globalization Namespace | PercentDecimalDigits | PercentDecimalSeparator | PercentGroupSeparator | PercentGroupSizes | PercentSymbol | PercentPositivePattern | CurrencyNegativePattern | NumberNegativePattern