文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>C#笔记31:本地化或多语言支持

C#笔记31:本地化或多语言支持

时间:2010-10-28  来源:luminji

4.You are developing an application for a client residing in Hong Kong.  You need to display negative currency values by using a minus sign. Which code segment should you use?
A. NumberFormatInfo culture = new CultureInfo("zh-HK").NumberFormat; 
culture.NumberNegativePattern = 1; return numberToPrint.ToString("C", culture);
B. NumberFormatInfo culture = new CultureInfo("zh-HK").NumberFormat; 
culture.CurrencyNegativePattern = 1; return numberToPrint.ToString("C", culture);
C. CultureInfo culture =new Cult  ureInfo("zh-HK"); return numberToPrint.ToString("-(0)", culture); 
D. CultureInfo culture =new CultureInfo("zh-HK"); return numberToPrint.ToString("()", culture);
Answer: B

 

5.You are developing a fiscal report for a customer. Your   customer has a main office in the United States and a      
satellite office in Mexico.   You need to ensure that when users in the satellite current date is displayed in Mexican Spanish format. Which code segment should you use?   
A. DateTimeFormatInfo dtfi = new CultureInfo("es-MX", false).DateTimeFormat; 
DateTime dt = new DateTime(DateTime.Today.Year, DateTime.Today.Month, DateTime.Today.Day);  
string dateString = dt.ToString(dtfi.LongDatePattern);
B. Calendar cal = new CultureInfo("es-MX", false).Calendar;  
DateTime dt = new DateTime(DateTime.Today.Year, DateTime.Today.Month, DateTime.Today.Day);  
Strong dateString = dt.ToString();
C. string dateString = DateTimeFormatInfo.CurrentInfo GetMonthName(DateTime.Today.Month);
D. string dateString = DateTime.Today.Month.ToString("es-MX"); 
Answer: A

相关阅读 更多 +
排行榜 更多 +
辰域智控app

辰域智控app

系统工具 下载
网医联盟app

网医联盟app

运动健身 下载
汇丰汇选App

汇丰汇选App

金融理财 下载