Friday, 9 March 2018

C# - Introduction

1. We will learn the basic structure of a c# program :

//Namespace Declaration

Usng System;

Class dotnet
{
   public static void Main()
   {
      //write to console
         Console.WriteLine("welcome to dotnet");
   }
}

2. Understand the purpose of Using Sytem declaration :

--> The namespace declaration, using system, indicates that you are using the system namespace. If you omit the using system, declaration, the you have to use the fully qualified name of the Console class.
--> A namespace is used to organize your code and is collection of classes, interfaces, structs, enums and delegates.

3. Purpose of Main() method :

    Main method is the entry point into your application.

No comments:

Post a Comment