My First C# Program

Note: This article was written in Dec 1999. This is a historic content. If you want to learn C#, start here: Learn C# Tutorials

You can type C# code in any editor such as NotePad, Wordpad etc. Type these lines and save files as a .cs extension. Now run from the command line csc filename.

Here is my first C# program. The output of this program on the console is "Hello, C#, World!".
  1. // using system   
  2. using System;  
  3. class Hello {  
  4.     static void Main() { // display output on console  
  5.         Console.WriteLine("Hello,C# World!");  
  6.     }  
  7. }  
Quick Method
Download attached file mc1.cs and run from the command line csc second.cs.