BCL mscorlib [00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ] 1.0.5000.0 2.0.0.0 4.0.0.0 This type is safe for multithreaded operations. System.Object System.ICloneable System.IFormatProvider

Supplies culture-specific formatting information for string representations of numeric values.

supplies symbols such as currency symbols and decimal separators.

A instance typically contains the set of symbols for a specific language and culture. Instances of can be created to provide customized formatting information.

- Constructor

  Constructs and initializes a new instance of the class.

  The new instance is not read-only, and is otherwise identical to the instance returned by the property.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.Object

  Creates a copy of the current instance.

  A that is a copy of the current instance.

  The method returns a new instance of with property values that are equal to the property values of the current instance except for the property, which is always .

  This method is implemented to support the interface.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Property
  System.Int32

  Gets or sets the number of decimal places in currency values.

  A containing the number of decimal places in currency values.

  The culture-invariant value for this property is 2.

  The value specified for a set operation is less than 0 or greater than 99. The current instance is read-only and a set operation was attempted. 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Property
  System.String

  Gets or sets the symbol used as the decimal separator in currency values.

  A containing the decimal separator used in currency values.

  The culture-invariant value for this property is ".".

  The value specified for a set operation is a null reference. The current instance is read-only and a set operation was attempted. 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Property
  System.String

  Gets or sets the symbol used to separate groups of digits to the left of the decimal point in currency values.

  A containing the group separator used in currency values.

  The culture-invariant value for this property is ",".

  The value specified for a set operation is a null reference. The current instance is read-only and a set operation was attempted. 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Property
  System.Int32[]

  Gets or sets the number of digits in each group to the left of the decimal point in currency values.

  A array containing elements that define the number of digits in each group in currency values.

  All elements of the array except the last are required to be between 1 and 9, inclusive. The last element can be 0.

  The first element of the array defines the number of elements in the first group of digits located immediately to the left of the . Each subsequent element refers to the next group of digits located to the left of the previous group. If the last element of the array is not zero, any remaining digits are grouped based on the last element of the array. If the last element is zero, the remaining digits are not grouped.

  The culture-invariant value for this property is an array with a single element containing the value 3.

  The array specified for a set operation is a null reference.

  One of the elements in the array specified for a set operation is not between 0 and 9.

  The current instance is read-only and a set operation was attempted.

  The following example demonstrates the effects of different property values.

  `using System; using System.Globalization; class Test { public static void Main() { NumberFormatInfo nfi = new NumberFormatInfo(); decimal myMoney = 9999999994444333221.00m; nfi.CurrencyGroupSizes = new int[] {1,2,3,4,0}; Console.WriteLine("{0}",myMoney.ToString("C",nfi)); myMoney = 123456789123456.78m; nfi.CurrencyGroupSizes = new int[] {3}; Console.WriteLine("{0}",myMoney.ToString("C",nfi)); nfi.CurrencyGroupSizes = new int[] {3,0}; Console.WriteLine("{0}",myMoney.ToString("C",nfi)); } }`

  The output is

  $999999999,4444,333,22,1.00

  $123,456,789,123,456.78

  $123456789123,456.78

  One of the elements in the array specified for a set operation is not between 0 and 9.

  -or-

  The array contains an element, other than the last element, that is set to 0.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Property
  System.Int32

  Gets or sets the format of negative currency values.

  A between 0 and 15 inclusive, which specifies the format of negative currency values.

  The following table describes the valid values for this property. "$" is used as the value for , "-" is used as the value for , and 999 represents any numeric value.

  Value
  Pattern
  0
  ($999)
  1
  -$999
  2
  $-999
  3
  $999-
  4
  (999$)
  5
  -999$
  6
  999-$
  7
  999$-
  8
  -999 $
  9
  -$ 999
  10
  999 $-
  11
  $ 999-
  12
  $ -999
  13
  999- $
  14
  ($ 999)
  15
  (999 $)

  The culture-invariant value for this property is 0.

  The value specified for a set operation is less than 0 or greater than 15. The current instance is read-only and a set operation was attempted.

  The following example demonstrates the effects of different property values.

  `using System; using System.Globalization; class Test { public static void Main() { NumberFormatInfo nfi = new NumberFormatInfo(); decimal myMoney = -9999999999999.00m; for (int i = 0; i<=15; i++) { nfi.CurrencyNegativePattern = i; Console.WriteLine("pattern # {0}: {1}",i,myMoney.ToString("C",nfi)); } } }`

  The output is

  pattern # 0: ($9,999,999,999,999.00)

  pattern # 1: -$9,999,999,999,999.00

  pattern # 2: $-9,999,999,999,999.00

  pattern # 3: $9,999,999,999,999.00-

  pattern # 4: (9,999,999,999,999.00$)

  pattern # 5: -9,999,999,999,999.00$

  pattern # 6: 9,999,999,999,999.00-$

  pattern # 7: 9,999,999,999,999.00$-

  pattern # 8: -9,999,999,999,999.00 $

  pattern # 9: -$ 9,999,999,999,999.00

  pattern # 10: 9,999,999,999,999.00 $-

  pattern # 11: $ 9,999,999,999,999.00-

  pattern # 12: $ -9,999,999,999,999.00

  pattern # 13: 9,999,999,999,999.00- $

  pattern # 14: ($ 9,999,999,999,999.00)

  pattern # 15: (9,999,999,999,999.00 $)

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Property
  System.Int32

  Gets or sets the format of positive currency values.

  A between 0 and 3 inclusive, containing the format of positive currency values.

  The following table describes the valid values for this property. "$" is used as the value for , and 999 represents any numeric value.

  Value
  Pattern
  0
  $999
  1
  999$
  2
  $ 999
  3
  999 $

  The culture-invariant value for this property is 0.

  The value specified for a set operation is less than 0 or greater than 3. The current instance is read-only and a set operation was attempted.

  The following example demonstrates the effects of different property values.

  `using System; using System.Globalization; class Test { public static void Main() { NumberFormatInfo nfi = new NumberFormatInfo(); decimal myMoney = 9999999999999.00m; for (int i = 0; i<=3; i++) { nfi.CurrencyPositivePattern = i; Console.WriteLine("pattern # {0}: {1}",i,myMoney.ToString("C",nfi)); } } }`

  The output is

  pattern # 0: $9,999,999,999,999.00

  pattern # 1: 9,999,999,999,999.00$

  pattern # 2: $ 9,999,999,999,999.00

  pattern # 3: 9,999,999,999,999.00 $

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Property
  System.String

  Gets or sets the currency symbol.

  A containing the currency symbol.

  The culture-invariant value for this property is the Unicode currency symbol 0x00a4.

  The value specified for a set operation is a null reference. The current instance is read-only and a set operation was attempted. 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Property
  System.Globalization.NumberFormatInfo

  Gets a instance containing formatting information for the current system culture.

  A read-only containing the settings for the current system culture.

  This property is read-only.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Property
  2.0.0.0
  4.0.0.0
  System.Runtime.InteropServices.ComVisible(false)
  System.Globalization.DigitShapes To be added. To be added. To be added.
- Method
  System.Object `` The of the formatting object to be returned.

  Returns an object of the specified type that provides formatting services.

  The current instance, if is of type ; otherwise, a null reference.

  This method is implemented to support the interface.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.Globalization.NumberFormatInfo `` To be added. To be added. To be added. To be added. 1.0.5000.0 2.0.0.0 4.0.0.0
- Property
  System.Globalization.NumberFormatInfo

  Gets a instance containing formatting information that is culture-independent and does not change.

  A read-only with property values which are universally supported. The property values of the returned are not impacted by changes to the current culture.

  This property is read-only.

  The following table lists the property values of the returned by this property.

  Property
  Default Description
  2 The number of decimal places in currency values.
  "." The string used as the decimal separator in currency values.
  "," The string used to separate groups of digits to the left of the decimal point in currency values.
  3 The number of digits in each group to the left of the decimal point in currency values.
  0 The format of negative currency values.
  0 The format of positive currency values.
  0x00a4 The Unicode currency symbol.
  "NaN" The string used to represent undefined floating-point values.
  "-Infinity" The string used to represent negative infinities.
  "-" The string used to indicate negative values.
  2 The default number of decimal places.
  "." The string used as the decimal separator.
  "," The string used to separate groups of digits to the left of the decimal point.
  3 The number of digits in each group to the left of the decimal point.
  1 The format of negative values.
  2 The default number of decimal places in percent values.
  "." The string used as the decimal separator in percent values.
  "," The string used to separate groups of digits to the left of the decimal point in percent values.
  3 The number of digits in each group to the left of the decimal in percent values.
  0 The format of negative percent values.
  0 The format of positive percent values.
  "%" The percent symbol.
  "" The per mille symbol.
  "Infinity" The string used to represent positive infinities.
  "+" The string used to indicate positive values. 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Property
  System.Boolean

  Gets a value indicating whether the current instance is read-only.

  if the current instance is read-only; otherwise .

  This property is read-only.

  Attempting to perform an assignment to a property of a read-only causes a .

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Property
  System.String

  Gets or sets the symbol that represents NaN (Not-a-Number) floating-point values.

  A containing the symbol for NaN values.

  The culture-invariant value for this property is "NaN".

  For more information on NaN values, see or .

  The value specified for a set operation is a null reference. The current instance is read-only and a set operation was attempted. 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Property
  2.0.0.0
  4.0.0.0
  System.Runtime.InteropServices.ComVisible(false)
  System.String[] To be added. To be added. To be added.
- Property
  System.String

  Gets or sets the symbol that represents negative infinity.

  A containing the symbol for negative infinity.

  The culture-invariant value for this property is "-Infinity".

  For more information on negative infinity, see or .

  The value specified for a set operation is a null reference. The current instance is read-only and a set operation was attempted. 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Property
  System.String

  Gets or sets the symbol used to represent negative values.

  A containing the symbol that indicates a value is negative.

  The culture-invariant value for this property is "-".

  The value specified for a set operation is a null reference. The current instance is read-only and a set operation was attempted. 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Property
  System.Int32

  Gets or sets the number of decimal places for numeric values.

  A containing the number of decimal places for numeric values.

  The culture-invariant value for this property is 2.

  The value specified for a set operation is less than 0 or greater than 99. The current instance is read-only and a set operation was attempted. 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Property
  System.String

  Gets or sets the symbol used as the decimal separator for numeric values.

  A containing the decimal separator.

  The culture-invariant value for this property is ".".

  The value specified for a set operation is a null reference. The current instance is read-only and a set operation was attempted. 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Property
  System.String

  Gets or sets the symbol used to separate groups of digits to the left of the decimal point for numeric values.

  A containing the group separator.

  The culture-invariant value for this property is ",".

  The value specified for a set operation is a null reference. The current instance is read-only and a set operation was attempted. 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Property
  System.Int32[]

  Gets or sets the number of digits in each group to the left of the decimal point for numeric values.

  A array containing elements that define the number of digits in each group in numeric values.

  All elements of the array except the last are required to be between 1 and 9, inclusive. The last element can be 0.

  The first element of the array defines the number of elements in the first group of digits located immediately to the left of the . Each subsequent element refers to the next group of digits located to the left of the previous group. If the last element of the array is not zero, any remaining digits are grouped based on the last element of the array. If the last element is zero, the remaining digits are not grouped.

  The culture-invariant value for this property is an array with a single element containing the value 3.

  The array specified for a set operation is a null reference. One of the elements in the array specified for a set operation is not between 0 and 9. The current instance is read-only and a set operation was attempted.

  The following example demonstrates the effects of different property values.

  `using System; using System.Globalization; class Test { public static void Main() { NumberFormatInfo nfi = new NumberFormatInfo(); decimal data = 9999999994444333221.00m; nfi.NumberGroupSizes = new int[] {1,2,3,4,0}; Console.WriteLine("{0}",data.ToString("N",nfi)); data = 123456789123456.78m; nfi.NumberGroupSizes = new int[] {3}; Console.WriteLine("{0}",data.ToString("N",nfi)); nfi.NumberGroupSizes = new int[] {3,0}; Console.WriteLine("{0}",data.ToString("N",nfi)); } }`

  The output is

  999999999,4444,333,22,1.00

  123,456,789,123,456.78

  123456789123,456.78

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Property
  System.Int32

  Gets or sets the format of negative values.

  A between 0 and 4 inclusive that specifies the format of negative values.

  The following table describes the valid values for this property. "-" is used as the value for , and 999 represents any numeric value.

  Value
  Pattern
  0
  (999)
  1
  -999
  2
  - 999
  3
  999-
  4
  999 -

  The culture-invariant value for this property is 1.

  The value specified for a set operation is less than 0 or greater than 4. The current instance is read-only and a set operation was attempted.

  The following example demonstrates the effects of different property values.

  `using System; using System.Globalization; class Test { public static void Main() { NumberFormatInfo nfi = new NumberFormatInfo(); Double data = -9999999999999.00; for (int i = 0; i<=4; i++) { nfi.NumberNegativePattern = i; Console.WriteLine("pattern # {0}: {1}",i,data.ToString("N",nfi)); } } }`

  The output is

  pattern # 0: (9,999,999,999,999.00)

  pattern # 1: -9,999,999,999,999.00

  pattern # 2: - 9,999,999,999,999.00

  pattern # 3: 9,999,999,999,999.00-

  pattern # 4: 9,999,999,999,999.00 -

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Property
  System.Int32

  Gets or sets the number of decimal places in percent values.

  A containing the number of decimal places in percent values.

  The culture-invariant value for this property is 2.

  The value specified for a set operation is less than 0 or greater than 99. The current instance is read-only and a set operation was attempted. 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Property
  System.String

  Gets or sets the symbol used as the decimal separator in percent values.

  A containing the decimal separator used in percent values.

  The culture-invariant value for this property is ".".

  The value specified for a set operation is a null reference. The current instance is read-only and a set operation was attempted. 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Property
  System.String

  Gets or sets the symbol used to separate groups of digits to the left of the decimal point in percent values.

  A containing the group separator symbol used in percent values.

  The culture-invariant value for this property is ",".

  The value specified for a set operation is a null reference. The current instance is read-only and a set operation was attempted. 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Property
  System.Int32[]

  Gets or sets the number of digits in each group to the left of the decimal point in percent values.

  A array containing elements that define the number of digits in each group in percent values.

  All elements of the array except the last are required to be between 1 and 9, inclusive. The last element can be 0.

  The first element of the array defines the number of elements in the first group of digits located immediately to the left of the . Each subsequent element refers to the next group of digits located to the left of the previous group. If the last element of the array is not zero, any remaining digits are grouped based on the last element of the array. If the last element is zero, the remaining digits are not grouped.

  The culture-invariant value for this property is an array with a single element containing the value 3.

  The array specified for a set operation is a null reference.

  One of the elements in the array specified for a set operation is not between 0 and 9.

  The current instance is read-only and a set operation was attempted.

  The following example demonstrates the effects of different property values.

  `using System; using System.Globalization; class Test { public static void Main() { NumberFormatInfo nfi = new NumberFormatInfo(); decimal data = 9999999994444333221.00m; nfi.PercentGroupSizes = new int[] {1,2,3,4,0}; Console.WriteLine("{0}",data.ToString("P",nfi)); data = 123456789123456.78m; nfi.PercentGroupSizes = new int[] {3}; Console.WriteLine("{0}",data.ToString("P",nfi)); nfi.PercentGroupSizes = new int[] {3,0}; Console.WriteLine("{0}",data.ToString("P",nfi)); } }`

  The output is

  99999999944,4433,322,10,0.00 %

  12,345,678,912,345,678.00 %

  12345678912345,678.00 %

  One of the elements in the array specified for a set operation is not between 0 and 9.

  -or-

  The array contains an element, other than the last element, that is set to 0.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Property
  System.Int32

  Gets or sets the format of negative percent values.

  A between 0 and 2 inclusive that specifies the format of negative percent values.

  The following table describes the valid values for this property. "%" is used as the value for , "-" is used as the value for , and 999 represents any numeric value.

  Value
  Pattern
  0
  -999 %
  1
  -999%
  2
  -%999

  The culture-invariant value for this property is 0.

  The value specified for a set operation is less than 0 or greater than 2. The current instance is read-only and a set operation was attempted.

  The following example demonstrates the effects of different property values.

  `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.PercentNegativePattern = 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

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Property
  System.Int32

  Gets or sets the format of positive percent values.

  A between 0 and 2 inclusive that specifies the format of positive percent values.

  The following table describes the valid values for this property. "%" is used as the value for , and 999 represents a numeric value.

  Value
  Pattern
  0
  999 %
  1
  999%
  2
  %999

  The culture-invariant value for this property is 0.

  The value specified for a set operation is less than 0 or greater than 2. The current instance is read-only and a set operation was attempted.

  The following example demonstrates the effects of different property values.

  `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

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Property
  System.String

  Gets or sets the symbol that represents percentage values.

  A containing the percent symbol.

  The culture-invariant value for this property is "%".

  The value specified for a set operation is a null reference. The current instance is read-only and a set operation was attempted. 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Property
  System.String

  Gets or sets the per mille symbol.

  A containing the per mille symbol.

  The culture-invariant value for this property is "".

  The value specified for a set operation is a null reference. The current instance is read-only and a set operation was attempted. 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Property
  System.String

  Gets or sets the symbol that represents positive infinity.

  A containing the symbol for positive infinity.

  The culture-invariant value for this property is "Infinity".

  For more information on positive infinity, see or .

  The value specified for a set operation is a null reference. The current instance is read-only and a set operation was attempted. 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Property
  System.String

  Gets or sets the symbol used to represent positive values.

  A containing the symbol that indicates the value is positive.

  The culture-invariant value for this property is "+".

  The value specified for a set operation is a null reference The current instance is read-only and a set operation was attempted. 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.Globalization.NumberFormatInfo `` A object to copy.

  Creates a read-only copy of the specified instance.

  A that is a copy of the current instance, and cannot be altered.

  To be added. is a null reference. 0 1.0.5000.0 2.0.0.0 4.0.0.0
0 System.Runtime.InteropServices.ComVisible(true)