xref: /netbsd-src/external/gpl2/gettext/dist/gettext-tools/examples/hello-csharp/hello.cs (revision 82d56013d7b633d116a93943de88e08335357a7c)
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 {
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