Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

class System.​Globalization.​NumberFormatInfo

Assembly: System.Runtime

Inheritance: object → NumberFormatInfo

Implemented Interfaces

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

Properties

public int
CurrencyDecimalDigits
Gets or sets the number of decimal places to use in currency values.
public string
CurrencyDecimalSeparator
Gets or sets the string to use as the decimal separator in currency values.
public string
CurrencyGroupSeparator
Gets or sets the string that separates groups of digits to the left of the decimal in currency values.
public int[]
CurrencyGroupSizes
Gets or sets the number of digits in each group to the left of the decimal in currency values.
public int
CurrencyNegativePattern
Gets or sets the format pattern for negative currency values.
public int
CurrencyPositivePattern
Gets or sets the format pattern for positive currency values.
public string
CurrencySymbol
Gets or sets the string to use as the currency symbol.
public static NumberFormatInfo
CurrentInfo
Gets a read-only <see cref="T:System.Globalization.NumberFormatInfo" /> that formats values based on the current culture.
public DigitShapes
DigitSubstitution
Gets or sets a value that specifies how the graphical user interface displays the shape of a digit.
public static NumberFormatInfo
InvariantInfo
Gets a read-only <see cref="T:System.Globalization.NumberFormatInfo" /> object that is culture-independent (invariant).
public bool
IsReadOnly
Gets a value that indicates whether this <see cref="T:System.Globalization.NumberFormatInfo" /> object is read-only.
public string
NaNSymbol
Gets or sets the string that represents the IEEE NaN (not a number) value.
public string[]
NativeDigits
Gets or sets a string array of native digits equivalent to the Western digits 0 through 9.
public string
NegativeInfinitySymbol
Gets or sets the string that represents negative infinity.
public string
NegativeSign
Gets or sets the string that denotes that the associated number is negative.
public int
NumberDecimalDigits
Gets or sets the number of decimal places to use in numeric values.
public string
NumberDecimalSeparator
Gets or sets the string to use as the decimal separator in numeric values.
public string
NumberGroupSeparator
Gets or sets the string that separates groups of digits to the left of the decimal in numeric values.
public int[]
NumberGroupSizes
Gets or sets the number of digits in each group to the left of the decimal in numeric values.
public int
NumberNegativePattern
Gets or sets the format pattern for negative numeric values.
public int
PercentDecimalDigits
Gets or sets the number of decimal places to use in percent values.
public string
PercentDecimalSeparator
Gets or sets the string to use as the decimal separator in percent values.
public string
PercentGroupSeparator
Gets or sets the string that separates groups of digits to the left of the decimal in percent values.
public int[]
PercentGroupSizes
Gets or sets the number of digits in each group to the left of the decimal in percent values.
public int
PercentNegativePattern
Gets or sets the format pattern for negative percent values.
public int
PercentPositivePattern
Gets or sets the format pattern for positive percent values.
public string
PercentSymbol
Gets or sets the string to use as the percent symbol.
public string
PerMilleSymbol
Gets or sets the string to use as the per mille symbol.
public string
PositiveInfinitySymbol
Gets or sets the string that represents positive infinity.
public string
PositiveSign
Gets or sets the string that denotes that the associated number is positive.

Methods

public object
Clone​()
Creates a shallow copy of the <see cref="T:System.Globalization.NumberFormatInfo" /> object.
Returns A new object copied from the original <see cref="T:System.Globalization.NumberFormatInfo" /> object.
public object
GetFormat​(Type formatType)
Gets an object of the specified type that provides a number formatting service.
Returns The current <see cref="T:System.Globalization.NumberFormatInfo" /> , if <paramref name="formatType" /> is the same as the type of the current <see cref="T:System.Globalization.NumberFormatInfo" /> ; otherwise, <see langword="null" /> .
formatType The <see cref="T:System.Type" /> of the required formatting service.
public static NumberFormatInfo
GetInstance​(IFormatProvider? formatProvider)
Gets the <see cref="T:System.Globalization.NumberFormatInfo" /> associated with the specified <see cref="T:System.IFormatProvider" /> .
Returns The <see cref="T:System.Globalization.NumberFormatInfo" /> associated with the specified <see cref="T:System.IFormatProvider" /> .
formatProvider The <see cref="T:System.IFormatProvider" /> used to get the <see cref="T:System.Globalization.NumberFormatInfo" /> . -or- <see langword="null" /> to get <see cref="P:System.Globalization.NumberFormatInfo.CurrentInfo" /> .
public static NumberFormatInfo
ReadOnly​(NumberFormatInfo nfi)
Returns a read-only <see cref="T:System.Globalization.NumberFormatInfo" /> wrapper.
Returns A read-only <see cref="T:System.Globalization.NumberFormatInfo" /> wrapper around <paramref name="nfi" /> .
nfi The <see cref="T:System.Globalization.NumberFormatInfo" /> to wrap.
public bool
Equals​(object obj)
Inherited from object
Determines whether the specified object is equal to the current object.
Returns <see langword="true" /> if the specified object is equal to the current object; otherwise, <see langword="false" /> .
obj The object to compare with the current object.
protected void
Finalize​()
Inherited from object
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
public int
GetHashCode​()
Inherited from object
Serves as the default hash function.
Returns A hash code for the current object.
public Type
GetType​()
Inherited from object
Gets the <see cref="T:System.Type" /> of the current instance.
Returns The exact runtime type of the current instance.
protected object
MemberwiseClone​()
Inherited from object
Creates a shallow copy of the current <see cref="T:System.Object" /> .
Returns A shallow copy of the current <see cref="T:System.Object" /> .
public string
ToString​()
Inherited from object
Returns a string that represents the current object.
Returns A string that represents the current object.