Export (0) Print
Expand All

Imports, Common Properties, <Projectname> Property Pages Dialog Box

Visual Studio .NET 2003

Specifies the namespaces to import for the project. The imports you specify in this dialog box are passed directly to the compiler (/imports) and apply to all files in your project. Use the Imports statement to use a namespace in a single source code file.

Importing a namespace allows you to use elements from that namespace in your code without fully qualifying the element. For example, if you want to access the Create method in the System.Messaging.MessageQueue class, you can import the System.Messaging namespace and just refer to the element you need in code as MessageQueue.Create.

For information on how to access the Imports property page in the Common Properties folder, see Setting Visual Basic Project Properties. To access the imports programmatically, see Imports Object and Imports Property (VSProject Object).

Namespace
Type the name of the namespace you want to add to the project.
Add Import
Adds the specified namespace to the project.
Update
Replaces the namespace highlighted in the Project Imports box with the namespace specified in the Namespace box.
Project Imports
Lists all of the namespaces referenced by the project.
Remove
Removes the currently selected namespace from the Project Imports box.

See Also

<Projectname> Property Pages Dialog Box

Show:
© 2014 Microsoft