Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

NumberFormatInfo.PercentSymbol Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets or sets the string to use as the percent symbol.

Namespace:   System.Globalization
Assembly:  mscorlib (in mscorlib.dll)

public string PercentSymbol { get; set; }

Property Value

Type: System.String

The string to use as the percent symbol. The default for InvariantInfo is "%".

Exception Condition
ArgumentNullException

The property is being set to null.

InvalidOperationException

The property is being set and the NumberFormatInfo object is read-only.

The string assigned to the PercentSymbol property is included in the result string when a numeric value is formatted with the "P" or with a format string that includes the "%" .

Universal Windows Platform
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top
Show:
© 2018 Microsoft