NumberFormatInfo.Percent Decimal Digits
using System;
using System.Globalization;
class NumberFormatInfoSample {
public static void Main() {
NumberFormatInfo nfi = new CultureInfo( "en-US", false ).NumberFormat;
Double myInt = 0.1234;
Console.WriteLine( myInt.ToString( "P", nfi ) );
nfi.PercentDecimalDigits = 4;
Console.WriteLine( myInt.ToString( "P", nfi ) );
}
}
//12.34 %
//12.3400 %
Related examples in the same category