Share via

NumberFormatInfo.CurrencySymbol Property


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

 property System::String ^ CurrencySymbol { System::String ^ get(); void set(System::String ^ value); };
public string CurrencySymbol { get; set; }
member this.CurrencySymbol : string with get, set
Public Property CurrencySymbol As String

Property Value

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


The property is being set to null.

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


The following example displays the currency symbol for the current culture and uses the "C" standard numeric format string to format a currency value.

using System;
using System.Globalization;

public class Example
   public static void Main()
      Decimal value = 106.25m;
      Console.WriteLine("Current Culture: {0}",
      Console.WriteLine("Currency Symbol: {0}",
      Console.WriteLine("Currency Value:  {0:C2}", value);
// The example displays the following output:
//       Current Culture: en-US
//       Currency Symbol: $
//       Currency Value:  $106.25
Imports System.Globalization
Imports System.Threading

Module Example
   Public Sub Main()
      Dim value As Decimal = 106.25d
      Console.WriteLine("Current Culture: {0}",
      Console.WriteLine("Currency Symbol: {0}",
      Console.WriteLine("Currency Value:  {0:C2}", value)
   End Sub
End Module
' The example displays output like the following:
'       Current Culture: en-US
'       Currency Symbol: $
'       Currency Value:  $106.25


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 string.

Applies to

See also