|
Listing 2-11 extracted from chapter
Assembly, module, IL language
Listing 2-10< > Listing 2-12
This listing can be compiled with the command line: csc.exe /target:exe Example_2_11.cs /r:System.dll Errors: 0 Warnings: 0
Example_2_11.cs
using System.Threading; // For the Thread class.
using System.Globalization; // For the CultureInfo class.
class Program {
static void Main() {
Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
System.Console.WriteLine(System.DateTime.Now.ToString());
Thread.CurrentThread.CurrentCulture = new CultureInfo("fr-FR");
System.Console.WriteLine(System.DateTime.Now.ToString());
}
}
Copyright Patrick Smacchia 2006 2007
|