|
Listing 2-9 extracted from chapter
Assembly, module, IL language
Listing 2-8< > Listing 2-10
This listing can be compiled with the command line: csc.exe /out:Program.exe /target:exe Example_2_9_to_rename_Program.cs /r:System.dll Errors: 1 Warnings: 0
Example_2_9_to_rename_Program.cs
using System.Resources; // For the ResourceManager class.
using System.Threading; // For the Thread class.
using System.Globalization; // For the CultureInfoclass.
class Program {
static void Main() {
Thread.CurrentThread.CurrentUICulture = new CultureInfo("es-ES");
ResourceManager rm = new ResourceManager( "MyRes" ,
typeof(MyRes).Assembly);
System.Console.WriteLine(rm.GetString("Bonjour"));
}
}
Copyright Patrick Smacchia 2006 2007
|