class NumberFormatInfo

in global :: System . Globalization

Provides culture-specific information for formatting and parsing numeric values.


public int CurrencyDecimalDigits { get; set; }

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

  • Returns The number of decimal places to use in currency values. The default for is 2.

public string CurrencyDecimalSeparator { get; set; }

Gets or sets the string to use as the decimal separator in currency values.

  • Returns The string to use as the decimal separator in currency values. The default for is ".".

public string CurrencyGroupSeparator { get; set; }

Gets or sets the string that separates groups of digits to the left of the decimal in currency values.

  • Returns The string that separates groups of digits to the left of the decimal in currency values. The default for is ",".

public int[] CurrencyGroupSizes { get; set; }

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

  • Returns The number of digits in each group to the left of the decimal in currency values. The default for is a one-dimensional array with only one element, which is set to 3.

public int CurrencyNegativePattern { get; set; }

Gets or sets the format pattern for negative currency values.

  • Returns The format pattern for negative currency values. The default for is 0, which represents "($n)", where "$" is the and is a number.

public int CurrencyPositivePattern { get; set; }

Gets or sets the format pattern for positive currency values.

  • Returns The format pattern for positive currency values. The default for is 0, which represents "$n", where "$" is the and is a number.

public string CurrencySymbol { get; set; }

Gets or sets the string to use as the currency symbol.

  • Returns The string to use as the currency symbol. The default for is "¤".

public static NumberFormatInfo CurrentInfo { get; }

Gets a read-only that formats values based on the current culture.

  • Returns A read-only based on the culture of the current thread.

public DigitShapes DigitSubstitution { get; set; }

Gets or sets a value that specifies how the graphical user interface displays the shape of a digit.

  • Returns One of the enumeration values that specifies the culture-specific digit shape.

public object GetFormat( Type formatType )

Gets an object of the specified type that provides a number formatting service.

  • formatType The of the required formatting service.
  • Returns The current , if is the same as the type of the current ; otherwise, .

public static NumberFormatInfo GetInstance( IFormatProvider formatProvider )

Gets the associated with the specified .

  • formatProvider The used to get the . -or- to get .
  • Returns The associated with the specified .

public static NumberFormatInfo InvariantInfo { get; }

Gets a read-only object that is culture-independent (invariant).

  • Returns A read-only object that is culture-independent (invariant).

public bool IsReadOnly { get; }

Gets a value that indicates whether this object is read-only.

  • Returns if the is read-only; otherwise, .

public string NaNSymbol { get; set; }

Gets or sets the string that represents the IEEE NaN (not a number) value.

  • Returns The string that represents the IEEE NaN (not a number) value. The default for is "NaN".

public string[] NativeDigits { get; set; }

Gets or sets a string array of native digits equivalent to the Western digits 0 through 9.

  • Returns A string array that contains the native equivalent of the Western digits 0 through 9. The default is an array having the elements "0", "1", "2", "3", "4", "5", "6", "7", "8", and "9".

public string NegativeInfinitySymbol { get; set; }

Gets or sets the string that represents negative infinity.

  • Returns The string that represents negative infinity. The default for is "-Infinity".

public string NegativeSign { get; set; }

Gets or sets the string that denotes that the associated number is negative.

  • Returns The string that denotes that the associated number is negative. The default for is "-".

public int NumberDecimalDigits { get; set; }

Gets or sets the number of decimal places to use in numeric values.

  • Returns The number of decimal places to use in numeric values. The default for is 2.

public string NumberDecimalSeparator { get; set; }

Gets or sets the string to use as the decimal separator in numeric values.

  • Returns The string to use as the decimal separator in numeric values. The default for is ".".

public string NumberGroupSeparator { get; set; }

Gets or sets the string that separates groups of digits to the left of the decimal in numeric values.

  • Returns The string that separates groups of digits to the left of the decimal in numeric values. The default for is ",".

public int[] NumberGroupSizes { get; set; }

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

  • Returns The number of digits in each group to the left of the decimal in numeric values. The default for is a one-dimensional array with only one element, which is set to 3.

public int NumberNegativePattern { get; set; }

Gets or sets the format pattern for negative numeric values.

  • Returns The format pattern for negative numeric values.

public int PercentDecimalDigits { get; set; }

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

  • Returns The number of decimal places to use in percent values. The default for is 2.

public string PercentDecimalSeparator { get; set; }

Gets or sets the string to use as the decimal separator in percent values.

  • Returns The string to use as the decimal separator in percent values. The default for is ".".

public string PercentGroupSeparator { get; set; }

Gets or sets the string that separates groups of digits to the left of the decimal in percent values.

  • Returns The string that separates groups of digits to the left of the decimal in percent values. The default for is ",".

public int[] PercentGroupSizes { get; set; }

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

  • Returns The number of digits in each group to the left of the decimal in percent values. The default for is a one-dimensional array with only one element, which is set to 3.

public int PercentNegativePattern { get; set; }

Gets or sets the format pattern for negative percent values.

  • Returns The format pattern for negative percent values. The default for is 0, which represents "-n %", where "%" is the and is a number.

public int PercentPositivePattern { get; set; }

Gets or sets the format pattern for positive percent values.

  • Returns The format pattern for positive percent values. The default for is 0, which represents "n %", where "%" is the and is a number.

public string PercentSymbol { get; set; }

Gets or sets the string to use as the percent symbol.

  • Returns The string to use as the percent symbol. The default for is "%".

public string PerMilleSymbol { get; set; }

Gets or sets the string to use as the per mille symbol.

  • Returns The string to use as the per mille symbol. The default for is "‰", which is the Unicode character U+2030.

public string PositiveInfinitySymbol { get; set; }

Gets or sets the string that represents positive infinity.

  • Returns The string that represents positive infinity. The default for is "Infinity".

public string PositiveSign { get; set; }

Gets or sets the string that denotes that the associated number is positive.

  • Returns The string that denotes that the associated number is positive. The default for is "+".

public static NumberFormatInfo ReadOnly( NumberFormatInfo nfi )

Returns a read-only wrapper.

  • nfi The to wrap.
  • Returns A read-only wrapper around .

public int GetHashCode( )

😔 No documentation found.

public object Clone( )

😔 No documentation found.

public Type GetType( )

😔 No documentation found.

public string ToString( )

😔 No documentation found.

public bool Equals( object obj )

😔 No documentation found.

public NumberFormatInfo( )

😔 No documentation found.