To elaborate a bit…when you reference an assembly (or DLL), you are telling Visual Studio to include it in your project, which is how a compiled assembly is made available.
The “using” directives are simply a convenience mechanism, which allow you to omit the fully-qualified namespace when you refer to members of that namespace.
In other words, the only thing that’s required in order to use some code from an assembly is to add a reference to that assembly. But if you do not add a using directive for the assembly’s namespace, your code would be a lot more verbose.
For example, in several projects I use GHI’s Glide UI library to create UI elements and forms. In order to use Glide, I have to reference the Glide assembly/DLL. Then, if I wanted to create a button, I could use code like this:
GHIElectronics.NETMF.Glide.UI.Button myButton = new GHIElectronics.NETMF.Glide.UI.Button();
That’s a lot of typing for one little button. By adding a using statement:
I can shorten my code to:
Button myButton = new Button();
Note that if you have multiple assemblies and using directives that have a class of the same name, you might have to still include the namespace in the code, but if that’s the case, the compiler will give you a heads up about the ambiguous reference(s).