First C#.NET Program
Managed Code/Intermediate Language (MSIL) format that uses instructions which are
CPU-independent.
First C#.NET Program
/* This is the famous helloworld program written using C#.NET */
/* Indicates that the code is referring System Namespace to access the
functionality's of System.dll */
using
System;
// Namespace name given for the class
namespace
HelloWorldSample
{
//Definition of the class
public
class
HelloWorld
{
// Entry point method for the class
public
static
void
Main()
{
//Displaying helloworld in the screen
System.Console.WriteLine("HelloWorld");
}
//end of the class declaration
}
//end of the namespace
}
Figure showing HelloWorld program written using C#.NET in Notepad