Class1.cs
上传用户:lxycoco
上传日期:2022-07-21
资源大小:38457k
文件大小:1k
源码类别:

C#编程

开发平台:

Others

  1. using System;
  2. using System.Globalization;
  3. namespace Wrox.ProCSharp.Localization
  4. {
  5. /// <summary>
  6. /// Summary description for Class1.
  7. /// </summary>
  8. class Class1
  9. {
  10. /// <summary>
  11. /// The main entry point for the application.
  12. /// </summary>
  13. [STAThread]
  14. static void Main(string[] args)
  15. {
  16. DatabaseResourceManager rm = new DatabaseResourceManager("server=localhost;database=LocalizationDemo;trusted_connection=true");
  17. string spanishWelcome = rm.GetString("Welcome", new CultureInfo("es-ES"));
  18. string italianThankyou = rm.GetString("Thank you", new CultureInfo("it"));
  19. string threadDefaultGoodMorning = rm.GetString("Good Morning");
  20. Console.WriteLine(threadDefaultGoodMorning);
  21. }
  22. }
  23. }