Numeric Format Strings:P

LetterMeaning
PPercent

using System;
using System.Text;
using System.Globalization;
class Sample
{
    public static void Main()
    {
        Console.WriteLine("{0:P}", .999);
        Console.WriteLine("{0:P0}", .888);

    }
}

The output:


99.90 %
89 %
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.