Mega Code Archive

 
Categories / C# / Date Time
 

Displays the words Hello World! on the screen, along with the current date and time

/* Mastering Visual C# .NET by Jason Price, Mike Gunderloy Publisher: Sybex; ISBN: 0782129110 */ /*   Example1_1.cs: a variation on the classic "Hello World!" program.   This program displays the words "Hello World!" on the screen,   along with the current date and time */ public class Example1_1 {   public static void Main()   {     // display "Hello World!" on the screen     System.Console.WriteLine("Hello World!");     // display the current date and time     System.Console.WriteLine("The current date and time is " +       System.DateTime.Now);   } }