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?

Signature
Dennis in Houston
Herfried K. Wagner [MVP] - 23 Oct 2004 14:25 GMT
"Dennis" <Dennis@discussions.microsoft.com> schrieb:
> 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.

Signature
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/
Shiva - 23 Oct 2004 14:35 GMT
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?

Signature
Dennis in Houston
Larry Serflaten - 23 Oct 2004 15:17 GMT
> 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
Dennis - 23 Oct 2004 16:47 GMT
Thank you for a GREAT reply. That answers my question as well as the
additonal question I had on why not include all imports.
> > 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
[quoted text clipped - 11 lines]
>
> LFS