Wow, that is a long name! Furthermore, if I wanted to create a command object and a data reader from that same namespace, I'd have to add the next two lines of code:
Dim cmd As System.Data.SqlClient.SqlCommand Dim dr As System.Data.SqlClient.SqlDataReader
System.Data.SqlClient.SqlCommand cmd; System.Data.SqlClient.SqlDataReader dr;
To reduce the amount of carpel tunnel, Microsoft allows us to use an Imports statement which makes all the classes in a given namespace available without having to type its full name each time.
Imports System.Data.SqlClient ...
Dim con As SqlConnection Dim cmd As SqlCommand Dim dr As SqlDataReader
using System.Data.SqlClient; ...
SqlConnection con; SqlCommand cmd; SqlDataReader dr;
Supplemental Readings for the Express Edition Videos Copyright © 2005 LearnVisualStudio.NET