Class1.cs
上传用户:lxycoco
上传日期:2022-07-21
资源大小:38457k
文件大小:1k
- using System;
- using System.Globalization;
- using System.Threading;
- namespace Wrox.ProCSharp.Localization
- {
- class Class1
- {
- static void Main(string[] args)
- {
- int val = 1234567890;
- // culture of the current thread
- Console.WriteLine(val.ToString("N"));
- // use IFormatProvider
- Console.WriteLine(val.ToString("N", new CultureInfo("fr-FR")));
- // change the culture of the thread
- Thread.CurrentThread.CurrentCulture = new CultureInfo("de-DE");
- Console.WriteLine(val.ToString("N"));
- }
- }
- }