C# tutorial for beginner - what is namespace in c#

What is namespace in c#

NameSpace  is a collection of classes and Using is keyword to import namespace(Using is just like #include in C-Language), their are various inbuilt namespace available in C# .net.
1.Data --is a namespace for database connnectivity.
2.A System(Root namespace) is namespace which consist several classes for basic operation like Console.
3.Where is a namespace..which is consist several of class
4.MVC is a namespace which consist several class for defining the webpage by MVC.


What is class and the architeture of class in c#

Class is a keyword. Class allow to create a user define data type with in a class we 
can have multiples of variable Every types of variable a plays a significant
role by developing  the application
For Example:

 >When we declare the class in c# a variable can have 5 kind of scope.
  i>private
 ii>public
iii>protected
 iv>Internal
  v>protected internal


If we declare class in c# by default scope of the class is  Internal.
If we declare the variable within class by default scope is  private.

Whenever write a class in c# by default it is child class or derive class inherited from object class(base class)

  
   using System;

  class Employee      //(Employee is custom type which is define by me)
    {
         int a;
         string name;
         public static void Main()
         {

         }
    }


Oldest

2 comments

Click here for comments