NumberFormatInfo properties: Percent : NumberFormatInfo « Data Types « C# / C Sharp






NumberFormatInfo properties: Percent

 

using System;
using System.Globalization;
using System.Text;

class SamplesNumberFormatInfo  {
   public static void Main()  {
      NumberFormatInfo myInv = NumberFormatInfo.InvariantInfo;
      UnicodeEncoding myUE = new UnicodeEncoding( true, false );
      byte[] myCodes;



      Console.WriteLine( "PercentDecimalDigits{0}", myInv.PercentDecimalDigits );
      Console.WriteLine( "PercentDecimalSeparator{0}", myInv.PercentDecimalSeparator );
      Console.WriteLine( "PercentGroupSeparator{0}", myInv.PercentGroupSeparator );
      Console.WriteLine( "PercentGroupSizes{0}", myInv.PercentGroupSizes[0] );
      Console.WriteLine( "PercentNegativePattern{0}", myInv.PercentNegativePattern );
      Console.WriteLine( "PercentPositivePattern{0}", myInv.PercentPositivePattern );
      myCodes = myUE.GetBytes( myInv.PercentSymbol );
      Console.WriteLine( "PercentSymbol{0}(U+{1:x2}{2:x2})", myInv.PercentSymbol, myCodes[0], myCodes[1] );
      myCodes = myUE.GetBytes( myInv.PerMilleSymbol );
      Console.WriteLine( "PerMilleSymbol{0}(U+{1:x2}{2:x2})", myInv.PerMilleSymbol, myCodes[0], myCodes[1] );
      Console.WriteLine( "PositiveInfinitySymbol{0}", myInv.PositiveInfinitySymbol );
      Console.WriteLine( "PositiveSign{0}", myInv.PositiveSign );

   }
}

   
  








Related examples in the same category

1.NumberFormatInfo Defines how numeric values are formatted and displayed, depending on the culture.
2.NumberFormatInfo.CurrencyDecimalDigits Indicates the number of decimal places to use in currency values.
3.NumberFormatInfo.Currency Decimal Separator
4.NumberFormatInfo.Currency Group Separator
5.NumberFormatInfo.Currency Group Sizes
6.NumberFormatInfo.Currency Symbol
7.NumberFormatInfo.Digit Substitution
8.NumberFormatInfo properties: Currency
9.NumberFormatInfo properties: Number
10.NumberFormatInfo.Native Digits
11.NumberFormatInfo.Number Decimal Digits
12.NumberFormatInfo.Number Decimal Separator
13.NumberFormatInfo.Number Group Separator Property
14.NumberFormatInfo.Number Group Sizes
15.Displays the value with three elements in the GroupSize array.
16.Displays the value with zero as the last element in the GroupSize array.
17.NumberFormatInfo.Number Negative Pattern
18.NumberFormatInfo.Percent Decimal Digits
19.NumberFormatInfo.Percent Decimal Separator
20.NumberFormatInfo.Percent Group Separator
21.NumberFormatInfo.Percent Group Sizes