- Basic structure of a c# program.
- What is a Namespace?
- Purpose of Main Method.
// Namespace Declaration
using System;
class Pragim
{
public static void Main()
{
// Write to console
Console.WriteLine ("Welcome to Pavel Resources!");
}
}
2.Namespace/Using System declaration:
The namespace declaration, using System, indicates that you are using the System namespace. If you omit the using System, declaration, then you have to use the fully qualified name of the Console class. Such as:
System.Console.WriteLine ("Welcome to Pavel Resources!");
A namespace is used to organize your code and is collection of classes, interfaces, structs, enums and delegates. We will discuss about namespaces in detail in a later session.
3.Purpose of Main Method:
Main method is the entry point into your application
No comments:
Post a Comment