System.Globalization.NumberFormatInfo.CurrencyDecimalDigits Property

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

Syntax

public int CurrencyDecimalDigits { get; set; }

Value

A int containing the number of decimal places in currency values.

Exceptions

TypeReason
ArgumentOutOfRangeExceptionThe value specified for a set operation is less than 0 or greater than 99.
InvalidOperationExceptionThe current instance is read-only and a set operation was attempted.

Remarks

The NumberFormatInfo.CurrencyDecimalDigits property is used with the "C" standard format string without a precision specifier in numeric formatting operations. It defines the default number of fractional digits that appear after the decimal separator. This value is overridden if a precision specifier is used. For more information, see Standard Numeric Format Strings.

Requirements

Namespace: System.Globalization
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0