NumberFormatInfo.CurrencySymbol Property
Gets or sets the string to use as the currency symbol.
Namespace: System.Globalization
Assembly: mscorlib (in mscorlib.dll)
Property Value
Type: System.StringThe string to use as the currency symbol. The default for InvariantInfo is "¤".
| Exception | Condition |
|---|---|
| ArgumentNullException | The property is being set to null. |
| InvalidOperationException | The property is being set and the NumberFormatInfo object is read-only. |
The string assigned to the CurrencySymbol property is included in the result string when a numeric value is formatted with the "C" standard numeric format specifier.
The following example demonstrates the CurrencySymbol property. This example is part of a larger example provided for the NumberFormatInfo class.
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.