System.Globalization.NumberFormatInfo.PercentSymbol Property

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

Syntax

public string PercentSymbol { get; set; }

Value

A string containing the percent symbol.

Exceptions

TypeReason
ArgumentNullExceptionThe value specified for a set operation is a null reference.
InvalidOperationExceptionThe current instance is read-only and a set operation was attempted.

Remarks

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

Requirements

Namespace: System.Globalization
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0