Gets or sets the format of positive percent values.
[Edit]
public int PercentPositivePattern { set; get; } |
|
Value
A int between 0 and 2 inclusive that specifies
the format of positive percent values.
[Edit]
Exceptions
Remarks
Example
The following example demonstrates the effects of
different NumberFormatInfo.PercentPositivePattern
property values.
C# Example |
using System;
using System.Globalization;
class Test {
public static void Main() {
NumberFormatInfo nfi = new NumberFormatInfo();
decimal data = .9900m;
for (int i = 0; i<=2 ; i++) {
nfi.PercentPositivePattern = i;
Console.WriteLine("pattern # {0}: {1}",i,data.ToString("P",nfi));
}
}
}
|
The output is
pattern # 0: 99.00 %
pattern # 1: 99.00%
pattern # 2: %99.00
Requirements
Namespace: System.Globalization
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0