Application Size

  • Thread starter Thread starter Guest
  • Start date Start date
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?
 
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.
 
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?
 
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
 
Thank you for a GREAT reply. That answers my question as well as the
additonal question I had on why not include all imports.
 
Back
Top