RegionInfo.CurrencySymbol-Eigenschaft
Ruft das dem Land bzw. der Region zugeordnete Währungssymbol ab.
Namespace: System.Globalization
Assembly: mscorlib (in mscorlib.dll)
Syntax
'Declaration
Public Overridable ReadOnly Property CurrencySymbol As String
'Usage
Dim instance As RegionInfo
Dim value As String
value = instance.CurrencySymbol
public virtual string CurrencySymbol { get; }
public:
virtual property String^ CurrencySymbol {
String^ get ();
}
/** @property */
public String get_CurrencySymbol ()
public function get CurrencySymbol () : String
Eigenschaftenwert
Das dem Land bzw. der Region zugeordnete Währungssymbol.
Hinweise
Beispielsweise ist das Währungssymbol für die Vereinigten Staaten "$".
Wenn das aktuelle RegionInfo-Objekt mit einer spezifischen Kultur erstellt wird und in der entsprechenden Region mehrere Sprachen verwendet werden, gibt die CurrencySymbol-Eigenschaft das der spezifischen Kultur zugeordnete Währungssymbol zurück.
Beispiel
Im folgenden Codebeispiel werden die Eigenschaften der RegionInfo-Klasse dargestellt.
Imports System
Imports System.Globalization
Public Class SamplesRegionInfo
Public Shared Sub Main()
' Displays the property values of the RegionInfo for "US".
Dim myRI1 As New RegionInfo("US")
Console.WriteLine(" Name: {0}", myRI1.Name)
Console.WriteLine(" DisplayName: {0}", myRI1.DisplayName)
Console.WriteLine(" EnglishName: {0}", myRI1.EnglishName)
Console.WriteLine(" IsMetric: {0}", myRI1.IsMetric)
Console.WriteLine(" ThreeLetterISORegionName: {0}", myRI1.ThreeLetterISORegionName)
Console.WriteLine(" ThreeLetterWindowsRegionName: {0}", myRI1.ThreeLetterWindowsRegionName)
Console.WriteLine(" TwoLetterISORegionName: {0}", myRI1.TwoLetterISORegionName)
Console.WriteLine(" CurrencySymbol: {0}", myRI1.CurrencySymbol)
Console.WriteLine(" ISOCurrencySymbol: {0}", myRI1.ISOCurrencySymbol)
End Sub 'Main
End Class 'SamplesRegionInfo
'This code produces the following output.
'
' Name: US
' DisplayName: United States
' EnglishName: United States
' IsMetric: False
' ThreeLetterISORegionName: USA
' ThreeLetterWindowsRegionName: USA
' TwoLetterISORegionName: US
' CurrencySymbol: $
' ISOCurrencySymbol: USD
using System;
using System.Globalization;
public class SamplesRegionInfo {
public static void Main() {
// Displays the property values of the RegionInfo for "US".
RegionInfo myRI1 = new RegionInfo( "US" );
Console.WriteLine( " Name: {0}", myRI1.Name );
Console.WriteLine( " DisplayName: {0}", myRI1.DisplayName );
Console.WriteLine( " EnglishName: {0}", myRI1.EnglishName );
Console.WriteLine( " IsMetric: {0}", myRI1.IsMetric );
Console.WriteLine( " ThreeLetterISORegionName: {0}", myRI1.ThreeLetterISORegionName );
Console.WriteLine( " ThreeLetterWindowsRegionName: {0}", myRI1.ThreeLetterWindowsRegionName );
Console.WriteLine( " TwoLetterISORegionName: {0}", myRI1.TwoLetterISORegionName );
Console.WriteLine( " CurrencySymbol: {0}", myRI1.CurrencySymbol );
Console.WriteLine( " ISOCurrencySymbol: {0}", myRI1.ISOCurrencySymbol );
}
}
/*
This code produces the following output.
Name: US
DisplayName: United States
EnglishName: United States
IsMetric: False
ThreeLetterISORegionName: USA
ThreeLetterWindowsRegionName: USA
TwoLetterISORegionName: US
CurrencySymbol: $
ISOCurrencySymbol: USD
*/
using namespace System;
using namespace System::Globalization;
int main()
{
// Displays the property values of the RegionInfo for "US".
RegionInfo^ myRI1 = gcnew RegionInfo( "US" );
Console::WriteLine( " Name: {0}", myRI1->Name );
Console::WriteLine( " DisplayName: {0}", myRI1->DisplayName );
Console::WriteLine( " EnglishName: {0}", myRI1->EnglishName );
Console::WriteLine( " IsMetric: {0}", myRI1->IsMetric );
Console::WriteLine( " ThreeLetterISORegionName: {0}", myRI1->ThreeLetterISORegionName );
Console::WriteLine( " ThreeLetterWindowsRegionName: {0}", myRI1->ThreeLetterWindowsRegionName );
Console::WriteLine( " TwoLetterISORegionName: {0}", myRI1->TwoLetterISORegionName );
Console::WriteLine( " CurrencySymbol: {0}", myRI1->CurrencySymbol );
Console::WriteLine( " ISOCurrencySymbol: {0}", myRI1->ISOCurrencySymbol );
}
/*
This code produces the following output.
Name: US
DisplayName: United States
EnglishName: United States
IsMetric: False
ThreeLetterISORegionName: USA
ThreeLetterWindowsRegionName: USA
TwoLetterISORegionName: US
CurrencySymbol: $
ISOCurrencySymbol: USD
*/
import System.*;
import System.Globalization.*;
public class SamplesRegionInfo
{
public static void main(String[] args)
{
// Displays the property values of the RegionInfo for "US".
RegionInfo myRI1 = new RegionInfo("US");
Console.WriteLine(" Name: {0}",
myRI1.get_Name());
Console.WriteLine(" DisplayName: {0}",
myRI1.get_DisplayName());
Console.WriteLine(" EnglishName: {0}",
myRI1.get_EnglishName());
Console.WriteLine(" IsMetric: {0}",
System.Convert.ToString( myRI1.get_IsMetric()));
Console.WriteLine(" ThreeLetterISORegionName: {0}",
myRI1.get_ThreeLetterISORegionName());
Console.WriteLine(" ThreeLetterWindowsRegionName: {0}",
myRI1.get_ThreeLetterWindowsRegionName());
Console.WriteLine(" TwoLetterISORegionName: {0}",
myRI1.get_TwoLetterISORegionName());
Console.WriteLine(" CurrencySymbol: {0}",
myRI1.get_CurrencySymbol());
Console.WriteLine(" ISOCurrencySymbol: {0}",
myRI1.get_ISOCurrencySymbol());
} //main
} //SamplesRegionInfo
/*
This code produces the following output.
Name: US
DisplayName: United States
EnglishName: United States
IsMetric: False
ThreeLetterISORegionName: USA
ThreeLetterWindowsRegionName: USA
TwoLetterISORegionName: US
CurrencySymbol: $
ISOCurrencySymbol: USD
*/
Plattformen
Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile für Pocket PC, Windows Mobile für Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.
Versionsinformationen
.NET Framework
Unterstützt in: 2.0, 1.1, 1.0
.NET Compact Framework
Unterstützt in: 2.0, 1.0
Siehe auch
Referenz
RegionInfo-Klasse
RegionInfo-Member
System.Globalization-Namespace
ISOCurrencySymbol