My First C# Program

Introduction

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!".

using System;
class Hello
{
    static void Main()
    {
        // Display output on console
        Console.WriteLine("Hello, C# World!");
    }
}

Quick Method

Download attached file mc1.cs and run from the command line csc second.cs.

Learn C# here: A complete list of C# Tutorials


Recommended Free Ebook
Similar Articles
Mindcracker
Founded in 2003, Mindcracker is the authority in custom software development and innovation. We put best practices into action. We deliver solutions based on consumer and industry analysis.