2013-08-23 45 views
2

如果我瞭解文化,我可以知道貨幣名稱和貨幣分數名稱嗎?如何獲取貨幣的FRACTION名稱?

如果是「en-US」,那將是dollar & cent

我想避免在數據庫中創建映射。如果asp.net可以提供這些信息,我會非常棒......可以嗎?

PS:最終目標是 - 給出double像78.54,我想seventy eight dollars and fifty four cents。我不想硬編碼dollars & cents,因爲這應該是獨立於文化的。

+0

的可能重複[我在哪裏可以找到貨幣分區劃名稱(如美分),生丁,(http://stackoverflow.com/questions/18151531/where-can-i-find-the-names-的貨幣,告子,例如,如美分的生丁) –

+5

@ssg這個問題是關於SAP我的朋友 –

+0

答案是不特定於SAP,但它肯定不會讓這個副本。 –

回答

2

淨缺乏號拼寫出來和貨幣部分名稱。

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

    Console.Clear(); 
    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 

*/ 

MSDN

+7

這不回答問題,因爲OP要求分數(例如分) –