1. Home
  2. Computing & Technology
  3. Visual Basic

Chapter 12 - Text Files and String Processing

By , About.com Guide

5 of 10

Exploring Text Files and String Processing - References and Imports

System.Data Reference

System.Data Reference

There are some basic namespaces that are pretty much standard in most applications. To see what they are, open a new VB.NET project and display the Solution Explorer window. Make sure References is expanded as shown. These References (and two others: mscorlib and Microsoft.VisualBasic which are fundamental and required so they don't even show them) are the namespaces that are automatically included with a standard VB.NET Windows Application.

In the previous chapter, the book had a Microsoft Word VBA (Visual Basic for Applications) example along with the discouraging note that the "code is designed for Word, not the Visual Basic Compiler". VBA is still the old VB 6.X level of technology and doesn't use namespaces.

In the next chapter (Chapter 13) however, we learn that we can add a namespace that "wrappers" Word and other Office applications in their own namespace. After you add a reference to Word, you see that several new namespaces have been added. One for Word and several for the code necessary to let you use this older technology in VB.NET. Since this iscovered in the next chapter, we'll wait until then to really dig into it.

The first step to including a namespace into your project so you can use all of the objects in it is to add a Reference to the VB.NET namespace. As we saw in lesson for Chapter 5, there is no requirement to use the Imports statement. It's simply a coding convenience that allows shorter names to be used.

Explore Visual Basic
By Category
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Visual Basic
  4. Learn VB.NET
  5. Exploring Text Files and String Processing

©2009 About.com, a part of The New York Times Company.

All rights reserved.