Beispiel #1
0
        /// <summary>
        /// Main method
        /// </summary>
        /// <param name="args">Arguments passed on runtime</param>
        static void Main(string[] args)
        {
            HelloWorld p = new HelloWorld();
            if (!p.getFullName())
                Environment.Exit(-1);
            else
            {
                String output = p.first + " ";
                if (p.hasMiddle)
                    output += p.middle + " ";
                output += p.surname;

                Console.WriteLine("\nHello " + output + ".\n\nPress any key to exit.");
                Console.ReadKey();
            } // else
        }
Beispiel #2
0
 static void Main(string[] args)
 {
     try
     {
         Console.WriteLine("Hello World!!");
         HelloWorld hworld = new HelloWorld();
         hworld.TestDisplay();
         //Console.WriteLine("Success");
         Console.Read();
     }
     catch (Exception ex)
     {
         Console.WriteLine("ERROR: " + ex.Message);
         //Console.Read();
     }
 }