Displays the words 'Hello World!' on the screen, along with the current date and time : Date Time : Development Class C# Source Code


Custom Search

C# Source Code » Development Class » 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);

  }

}

           
       
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Development Class
» Date Time