|
Listing 2-10 extracted from chapter
Assembly, module, IL language
Listing 2-9< > Listing 2-11
This listing can be compiled with the command line: csc.exe /out:Program.exe /target:exe Example_2_10_to_rename_Program.cs /r:System.dll Errors: 3 Warnings: 0
Example_2_10_to_rename_Program.cs
using System;
using System.Globalization; // For the CultureInfo class.
class Program {
static void Main() {
CultureInfo spainCulture = new CultureInfo("es-ES");
if( MyRes.ResourceManager.GetResourceSet(
spainCulture , true, false )!= null ) {
MyRes.Culture = spainCulture;
Console.WriteLine(MyRes.Bonjour);
}
else
Console.WriteLine("Satellite assembly es-ES not found!");
}
}
Copyright Patrick Smacchia 2006 2007
|