NumberFormatInfo.PercentSymbol NumberFormatInfo.PercentSymbol NumberFormatInfo.PercentSymbol NumberFormatInfo.PercentSymbol Property

定义

获取或设置用作百分比符号的字符串。Gets or sets the string to use as the percent symbol.

public:
 property System::String ^ PercentSymbol { System::String ^ get(); void set(System::String ^ value); };
public string PercentSymbol { get; set; }
member this.PercentSymbol : string with get, set
Public Property PercentSymbol As String

属性值

用作百分比符号的字符串。The string to use as the percent symbol. InvariantInfo 默认为“%”。The default for InvariantInfo is "%".

异常

该属性设置为 nullThe property is being set to null.

设置了该属性,但 NumberFormatInfo 对象为只读。The property is being set and the NumberFormatInfo object is read-only.

注解

当使用 "P" PercentSymbol或包含 "%" 格式字符串设置数值的格式时,分配给属性的字符串将包含在结果字符串中。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 "%" .

适用于

另请参阅