xref: /netbsd-src/external/gpl2/gettext/dist/gettext-tools/examples/hello-csharp/hello.cs (revision 946379e7b37692fc43f68eb0d1c10daa0a7f3b6c)
1 // Example for use of GNU gettext.
2 // Copyright (C) 2003-2004 Free Software Foundation, Inc.
3 // This file is in the public domain.
4 //
5 // Source code of the C# program.
6 
7 using System; /* String, Console */
8 using GNU.Gettext; /* GettextResourceManager */
9 using System.Diagnostics; /* Process */
10 
11 public class Hello {
Main(String[] args)12   public static void Main (String[] args) {
13     GettextResourceManager catalog =
14       new GettextResourceManager("hello-csharp");
15     Console.WriteLine(catalog.GetString("Hello, world!"));
16     Console.WriteLine(
17         String.Format(
18             catalog.GetString("This program is running as process number {0}."),
19             Process.GetCurrentProcess().Id));
20   }
21 }
22