Home > Articles > Programming > Windows Programming

  • Print
  • + Share This
Like this article? We recommend

Like this article? We recommend

The .NET Framework Class Library

The .NET Framework provides a number of types that are already created and ready for use in any language that targets the Common Language Runtime. These types include such items as the primitive data types, I/O functions, data access, and .NET Framework security.

Perhaps one of the biggest changes in the way developers will work with VB.NET is the entire area of namespaces. It is important to understand that the .NET Framework provides a host of utility classes and members, organized within a hierarchy called a namespace. At the root of the hierarchy is the System namespace. The namespace then groups classes and members into logical nodes. This way, you can have the same name for a method in more than one namespace. The Left() method could therefore exist in the System.Windows.Forms namespace and the Microsoft.VisualBasic namespace.

One advantage of namespaces is that similar functions can be grouped within the same namespace, regardless of the assembly in which they are physically located. Any language targeting the runtime can use the System namespaces. For example, if you need to perform data access, you do not set a reference to the ADO.NET component. Instead, you reference, or import, the System.Data namespace. Often you will see the following line:

Imports System.Data

This does not import all the methods and cause code bloat, however. Instead, it instructs the compiler to treat the methods and types within the namespace as part of your project's own namespace, so instead of having to write this,


you can simply make a call to this:


There are many other System namespaces; in fact, there are 24 in the first beta of the .NET Framework. System namespaces include the functionality for security, threading, text and binary I/O, and Web services. How to use various System namespaces is introduced throughout the book.

Don't let the term namespaces scare you. It is one of the most fundamental changes in VB.NET, but it is a service provided by the runtime that gives common, rich functionality to any language built on the runtime. As long as you inherit from the namespaces provided to you by the runtime, your application can run on any platform that supports .NET. In this way, you are working on learning the environment as much as you are learning the language.

  • + Share This
  • 🔖 Save To Your Account