Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / VB.NET / October 2004

Tip: Looking for answers? Try searching our database.

Application Size

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dennis - 23 Oct 2004 14: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?
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.