CurrencySymbol Property

NumberFormatInfo.CurrencySymbol Property

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

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

Namespace:  System.Globalization
Assembly:  mscorlib (in mscorlib.dll)

public string CurrencySymbol { get; set; }

Property Value

Type: System.String
The string to use as the currency symbol. The default for InvariantInfo is "¤".

ExceptionCondition
ArgumentNullException

The property is being set to null.

InvalidOperationException

The property is being set and the NumberFormatInfo object is read-only.

The following example demonstrates the CurrencySymbol property. This example is part of a larger example provided for the NumberFormatInfo class.


// Display the culture name and currency symbol.
NumberFormatInfo nfi = ci.NumberFormat;
sb.AppendFormat("The currency symbol for '{0}' is '{1}'",
    ci.DisplayName, nfi.CurrencySymbol);
sb.AppendLine();


Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft