// This is traditionally the first program written
using System;
namespace HelloWorldProgram
{
    class HelloWorld
    {
        static void Main()
        {
            Console.WriteLine("Hello World!");
        }
    }
}

I dont get why the statements in the body end with a " ; " but nothing is placed at the end of method headings. Guess this is the pain as a beginner in programming.....

Thanks Again !

{} indicates a block of code so the compiler knows that it ends when it reaches a closing }. ';' is used to mark the end of a statement so the compiler knows that you are done with that statement since C# ignores white space (except where significant). You could write

class
HelloWorld
{
static
void
Main()
{
Console.WriteLine(
"Hello World!"
)
;
}

As you get into more advanced programming, you'll find a few places where you have to type "};" :)

commented: Nice aswer! :) +14
commented: Simplicity :) +1
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.