RegionInfo.CurrencyNativeName Propiedad

Definición

Obtiene el nombre de la moneda utilizada en el país o región, con el formato del idioma nativo del país o región.

public:
 virtual property System::String ^ CurrencyNativeName { System::String ^ get(); };
public virtual string CurrencyNativeName { get; }
[System.Runtime.InteropServices.ComVisible(false)]
public virtual string CurrencyNativeName { get; }
member this.CurrencyNativeName : string
[<System.Runtime.InteropServices.ComVisible(false)>]
member this.CurrencyNativeName : string
Public Overridable ReadOnly Property CurrencyNativeName As String

Valor de propiedad

Nombre nativo de la moneda utilizada en el país o región, con el formato del idioma asociado al código de país o región ISO 3166.

Atributos

Ejemplos

En el ejemplo de código siguiente se muestra la CurrencyNativeName propiedad .

// This example demonstrates the RegionInfo.EnglishName, NativeName,
// CurrencyEnglishName, CurrencyNativeName, and GeoId properties.

using namespace System;
using namespace System::Globalization;

int main()
{
    // Regional Info for Sweden
    RegionInfo^ ri = gcnew RegionInfo("SE");

    Console::WriteLine("Region English Name: . . . {0}", ri->EnglishName);
    Console::WriteLine("Native Name: . . . . . . . {0}", ri->NativeName);
    Console::WriteLine("Currency English Name: . . {0}",
        ri->CurrencyEnglishName);
    Console::WriteLine("Currency Native Name:. . . {0}",
        ri->CurrencyNativeName);
    Console::WriteLine("Geographical ID: . . . . . {0}", ri->GeoId);
}
/*
This code example produces the following results:

Region English Name: . . . Sweden
Native Name: . . . . . . . Sverige
Currency English Name: . . Swedish Krona
Currency Native Name:. . . Svensk krona
Geographical ID: . . . . . 221

*/
// This example demonstrates the RegionInfo.EnglishName, NativeName,
// CurrencyEnglishName, CurrencyNativeName, and GeoId properties.

using System;
using System.Globalization;

class Sample
{
    public static void Main()
    {
    RegionInfo ri = new RegionInfo("SE"); // Sweden

    Console.WriteLine("Region English Name: . . . {0}", ri.EnglishName);
    Console.WriteLine("Native Name: . . . . . . . {0}", ri.NativeName);
    Console.WriteLine("Currency English Name: . . {0}", ri.CurrencyEnglishName);
    Console.WriteLine("Currency Native Name:. . . {0}", ri.CurrencyNativeName);
    Console.WriteLine("Geographical ID: . . . . . {0}", ri.GeoId);
    }
}
/*
This code example produces the following results:

Region English Name: . . . Sweden
Native Name: . . . . . . . Sverige
Currency English Name: . . Swedish Krona
Currency Native Name:. . . Svensk krona
Geographical ID: . . . . . 221

*/
' This example demonstrates the RegionInfo.EnglishName, NativeName,
' CurrencyEnglishName, CurrencyNativeName, and GeoId properties.
Imports System.Globalization

Class Sample
   Public Shared Sub Main()
      Dim ri As New RegionInfo("SE") ' Sweden
      Console.WriteLine("Region English Name: . . . {0}", ri.EnglishName)
      Console.WriteLine("Native Name: . . . . . . . {0}", ri.NativeName)
      Console.WriteLine("Currency English Name: . . {0}", ri.CurrencyEnglishName)
      Console.WriteLine("Currency Native Name:. . . {0}", ri.CurrencyNativeName)
      Console.WriteLine("Geographical ID: . . . . . {0}", ri.GeoId)
   End Sub
End Class
'
'This code example produces the following results:
'
'Region English Name: . . . Sweden
'Native Name: . . . . . . . Sverige
'Currency English Name: . . Swedish Krona
'Currency Native Name:. . . Svensk krona
'Geographical ID: . . . . . 221
'

Comentarios

Si el objeto actual RegionInfo se crea con una referencia cultural específica y se usa más de un idioma en el país o región correspondiente, la CurrencyNativeName propiedad recupera el nombre de moneda asociado a la referencia cultural específica.

El valor de esta propiedad depende del idioma asociado a un país o región determinado. Por lo tanto, si piensa usar la CurrencyNativeName propiedad , debe crear una instancia del RegionInfo objeto pasando al RegionInfo(String) constructor un idioma combinado y un código de país o región. Por ejemplo, si se crea una instancia de un RegionInfo objeto con un idioma combinado y código de país o región de "en-CA" para inglés (Canadá), el valor de su CurrencyNativeName propiedad es "Dólar canadiense". Si se crea una instancia con un código combinado de idioma y país o región de "fr-CA" para francés (Canadá), el valor de su CurrencyNativeName propiedad es "Dollar canadien". Por lo tanto, crear el RegionInfo objeto con solo un nombre de país o región ("CA" en este caso) no es lo suficientemente específico como para distinguir el nombre de moneda nativo adecuado.

Se aplica a