Application Size

G

Guest

If I have an import statement such as Imports System.Reflection in my project
code and don't actually need the classes from this imports, does it increase
the size of my final application.exe. In other words, does leaving imports
that are not needed in the project matter much?
 
H

Herfried K. Wagner [MVP]

Dennis said:
If I have an import statement such as Imports System.
Reflection in my project code and don't actually need the
classes from this imports, does it increase the size of
my final application.exe.

No.
 
S

Shiva

No, it doesn't.

If I have an import statement such as Imports System.Reflection in my
project
code and don't actually need the classes from this imports, does it increase
the size of my final application.exe. In other words, does leaving imports
that are not needed in the project matter much?
 
L

Larry Serflaten

Dennis said:
If I have an import statement such as Imports System.Reflection in my project
code and don't actually need the classes from this imports, does it increase
the size of my final application.exe. In other words, does leaving imports
that are not needed in the project matter much?

Imports is a desgin time convenience allowing you to reduce your typing
by promoting outside namespaces into your project. It does not equate
to additional code, but it does add clutter to your local scope (eg. Intellisense)

With scores of imported namespaces, you would have to resolve any name
confilcts that araise between the different namespaces, which then defeats the
purpose of including the Import statements. So, the better solution would
be to import only those namespaces that you actually use....

LFS
 
G

Guest

Thank you for a GREAT reply. That answers my question as well as the
additonal question I had on why not include all imports.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top