My First C# Program


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

Here is my first C# program. The output of this program on the console is "Hello, C#, World!".

// using system
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 command line csc second.cs.

Up Next
    Ebook Download
    View all
    FileInfo in C#
    Read by 9.7k people
    Download Now!
    Learn
    View all