The Book of Visual Studio .NET - A Visual Basic .NET Crash Course
Namespaces make it easy to organize classes, functions, data types, and structures into a hierarchy. Namespaces allow you to quickly access classes and methods buried in the .NET Framework Class Library or any other application that provides a namespace. The .NET Framework Class Library provides hundreds of classes and thousands of functions as well as data types and structures.
Use the Imports statement to import a namespace for easy access to its classes and methods. Once imported it is no longer necessary to use a fully qualified path to the desired class or method. For example:
Imports system.text ' Give access to the StringBuilder class
Table 7-2: Commonly Used Namespaces |
Microsoft.VisualBasic Contains the Visual Basic .NET runtime, classes, and methods used for compiling Visual Basic code.
System.ComponentModel Provides classes and interfaces for runtime and design time behavior including the ability to contain or to be contained.
The Container interface allows the Visual Studio .NET development environment to provide a graphical interface when developing a component.
System.Data Provides classes and interfaces to support data access including ADO.NET, XML, OLEDB, and SQL Server access.
System.Diagnostics Provides classes, allowing access to
System.DirectoryServices Provides the ability to search and interact with Active Directory services providers:
System.EnterpriseService Provides the ability to employ COM+ functionality for building enterprise applications.
System.Globalization Provides classes supporting multiple languages and cultures including date formats, calendars, and currencies.
System.IO Provides read and write access to data streams and files. Additional access is provided to related tasks including:
System.Management Provides access to information provided by WMI (Windows Management Instrumentation) including information about a systems drive space and CPU Utilization. Please refer to WMI for additional information concerning data that can be derived from the System.Management namespace.
System.Messaging Provides classes for managing Message Queues.
System.Net Provides classes for commonly used network protocols.
System.Reflection Provides classes for access to component metadata stored in an assemblies manifest.
System.Runtime.Remoting Provides classes designed for building distributed applications similar to classic DCOM (Distributed Component Object Model).
System.Runtime.Serialization Provides classes designed to serialize objects into a sequence of bits for storage or transfer to another system.
System.Security Implements the CLR's (Common Language Runtime) security components.
System.ServiceProcess Provides classes required for building Windows Services.
System.Text Provides classes for manipulating string data. Most notable is the StringBuilder class defining a modern approach to string manipulation.
System.Tread Provides classes for building multi-threaded applications.
System.Timer Provides classes for implementing non-visual timed events allowing actions to be taken on a given interval.
System.Web Provides classes and additional subordinate namespaces encompassing all aspects of web development including ASP .NET, Web Services, and web controls and more.
System.Windows.Forms Provides classes required for developing windows form applications.
System.XML Provides classes for manipulating and using XML.
This ends the first of three parts of a sample chapter from The Book of Visual Studio .NET, ISBN 1-886411-69-7 from No Starch Press
# # #
Page 5 of 5