Namespace in .NET

Hi friends ! many times i have seen that student do not include Namespace in our program , so that program gives error.Then student are faced more problems to Run the program. Before including Namespace ,you should know what is Namespace and why include it in our program.If you want to make a good programmer in c# then you should know more well about Namespace.Please read every things about Namespace which is give below:
What is Namespace in C#?.
A Namespace is collection of classes with related type contained in a assembly file.
 System.IO Namespace is used for I/O related type Files and Buffering.

There are two basic region for  using Namespace.
  1. To make the logical group of classes.
  2. To avoid the name confliction of classes(means more than class with same program but different Namespace).
Now i am going to explain some Namespaces which is more need in our programs.Here i have removed Using keyword in all Namespaces. please include it before every Namespace.
  1. System -> This Namespace  is used for following attribute in our program.
  • Mathematical computations.
  • Random Number generation
  • Garbage collection
  • Intrinsic data
  • Exceptions and attributes
    2. System.Data ->This Namespace is used when we are using Database connectivity in Ado.NET Application. If any Namespace  use "Data" attribute then it will used for Database connectivity in .NET.

     3. System.Data.sqlClient -> This also used for database connectivity in Ado.NET When we are use sql query for data connection.

     4. System.Collections -> This Namespace is used when we are using collections (Generic and Non Generic).

     5. System.Collections.Generic -> This Namespace is used for Generic collection(Ex. ArryList,stack,Dictionary,queue);
     6. System.Drawing -> This Namespace is used for Graphical Primitive data type such as size,fonts and printing services etc.

     7. System.Reflection -> This Namespace is used Run type discovery and dynamic creation of types.
     8. System.Security -> This Namespace is used for Security Purpose.Suppose if we are using Cryptography security in .NET Application then we will use this Namespace in our .NET Application.
     9. System.Threading -> This Application is used when we are making a multithreading application in .Net .

     10. System.web -> This Namespace is used when we are making a web Application in .NET. Ex.,XML web services etc.

     11. System.Windows.Forms -> When  we are making any GUI based application in .NET then we use this Namespace otherwise compiler gives error message.

     12. System.xml -> When we are using XML Language in our programs then we will use this Namespace in our programs.

      13. System.Configuration-> When  we configure some .net controls and use it in our .net application. then we use this Namespace.Ex. Configuration of Sql Data Source or Sql Data Adapter and use it for connection.
For More:-

  1. Delegate
  2. Event
  3.  Xml Application
  4. Constructor and Destructor
  5.   Make Captcha image for Asp.Net Application
I hope this helpful for you.
To Get the Latest  Free Updates Subscribeif any problem please comment it. 


Post a Comment

Powered by Blogger.