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

Chapter 5 - VB.NET Language and Syntax - Part 2

By , About.com Guide

8 of 10

What Should Have Been Included in the Book

There are two things that I think should have been included in the discussion in the book.

First - the description of the Imports statement is ... wellllll ... so incomplete that I would have to say that it's actually wrong.

Second - this is the first real introduction to the whole idea of using libraries of objects. It's such a powerful and fundamental idea that I think you should know more about just how powerful and fundamental it is.

The book states that the function of the Imports statement is to "add a library of objects, properties, and methods to your project." Close ... But not quite. The reason is an advanced topic, but I think you should at least be introduced to the whole truth just to prevent misconceptions.

Actually, the way to do what the book states is to add a Reference to your project. If no Reference is available, then it still won't work. In actual fact, the only thing that an Imports statement does is make the Namespace (another advanced topic) available within your code. Another way to say this is that you can reference the objects inside a library by their names without any qualification.

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

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

All rights reserved.