1 / 9

NAMESPACE

NAMESPACE. Namespaces. Namespaces are a way to define the classes and other types of information into one hierarchical structure. System is the basic namespace used by every .NET code.

trepanier
Download Presentation

NAMESPACE

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. NAMESPACE

  2. Namespaces • Namespaces are a way to define the classes and other types of information into one hierarchical structure. • System is the basic namespace used by every .NET code. • If we can explore the System namespace little bit, we can see it has lot of namespace that uses the system namespace. • For example, System.IO, System.Net, System.Collections, System.Threading, etc. • A namespace can be created via the Namespace keyword.

  3. The Namespace Hierarchy and Fully-Qualified Names • For example, the Button type is contained in the System.Windows.Forms namespace.

  4. Namespace Namespace1     Public Class Class1            'class code     End Class End Namespace

  5. Imports alias directives. • A Imports-alias-directive introduces an identifier that serves as an alias for a namespace or type within the immediately enclosing compilation unit or namespace body. Imports identifier = namespace-or-type-name; • Within member declarations in a compilation unit ,the identifier introduced by the Imports-alias-directive can be used to reference the given namespace or type.

  6. Some Namespaces and their use: • System: Includes essential classes and base classes for commonly used data types, events, exceptions and so on • System.Collections: Includes classes and interfaces that define various collection of objects such as list, queues, hash tables, arrays, etc • System.Data: Includes classes which lets us handle data from data sources • System.Data.OleDb: Includes classes that support the OLEDB .NET provider • System.Data.SqlClient: Includes classes that support the SQL Server .NET provider • System.Diagnostics: Includes classes that allow to debug our application and to step through our code

  7. System.Drawing:Provides access to drawing methods • System.Globalization: Includes classes that specify culture-related information • System.IO: Includes classes for data access with Files • System.Net: Provides interface to protocols used on the internet • System.Reflection: Includes classes and interfaces that return information about types, methods and fields • System.Security:Includes classes to support the structure of common language runtime security system

  8. System.Threading: Includes classes and interfaces to support multithreaded applications • System.Web: Includes classes and interfaces that support browser-server communication • System.Web.Services: Includes classes that let us build and use Web Services • System.Windows.Forms: Includes classes for creating Windows based forms • System.XML: Includes classes for XML support

More Related