Imports in VB.NET

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I just download a DLL from MS website for VS.NET 2005. I added it reference
to my project, and I have to add five [Imports] statements on top of each
class. It is burden.

I found that Microsoft Demo Project don't have [Imports] statement in the
class. How could they do that?

Thanks
 
Cor,

But how do I setup in Solution/Project property? I opened the raw solution
and project files, no information in two files. It must be in somewhere in
the project level.

Mike
 
MikeZ said:
But how do I setup in Solution/Project property? I opened the raw
solution and project files, no information in two files. It must be
in somewhere in the project level.

Double-click on My Project for your project, and then select the References
tab.

The top half of this tab shows the references you are making to other DLLs,
the bottom half shows the project-level imports.

To add an import that applies to your entire project, either find it in the
list and check its checkbox, or type in the namespace to be imported in the
textbox at the top and click the "Add User Import" button.

HTH,
 
Cor,

Cor Ligthert said:
Be aware that those can be set in the solution properties as well.

.... in the project properties only ("My Project" -> ...).
 
Back
Top