Your Ad Here

Friday, May 30, 2008

Display Current Data And Time

/* This program displays the words “Hello World!” on the screen,
along with the current date and time */

class Hello
{
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);
}
}

No comments: