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.

Namespaces and Assemblies

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dennis - 21 Oct 2004 02:01 GMT
I have a library of classes. Some of my applications don't need all the
classes in the library.  I assume if I import this class library into an
application then all classes will be imported;  I have three questions?

1) Is this correct in that all classes will be imported and increase the
size of my  final assembly?

2) If I use namespaces for individual classes and import only that name
space will all of the classes still be included in my applicaiton and
increase the size of the final assembly?

3) If I add a reference to a class library but don't import it will it still
be added to my final assembly?

Thanks for any clarification on these questions.
Signature

Dennis in Houston

Imran Koradia - 21 Oct 2004 02:16 GMT
>I have a library of classes. Some of my applications don't need all the
> classes in the library.  I assume if I import this class library into an
[quoted text clipped - 10 lines]
> still
> be added to my final assembly?

What do you mean by 'import this class library'? Do you mean just adding the
Imports statement on top of the source file (or in the project properties)?
The Imports statement does not 'import' anything as such. If you have a
class library, you simply add its reference to your application and then use
the Imports statement simply to be able to reference members from the class
library without explicit qualifications. That's all the Imports statement
does. Your class library exists as a seperate assembly - either in the GAC
if its a global one or in your application folder (being copied over). So as
such, what ever code you write in your application is what makes up your
assembly size. Ofcourse, since the application is dependent on the class
library, you need to deploy the class library as well - regardless whether
you are using only class or many classes from the library - along with your
application whenever you do so. That should pretty much answer all three of
your questions.

hope that helps..
Imran.
Dennis - 21 Oct 2004 03:03 GMT
Thank you.  You have answered all of my questions in that any assembly.dll
used in my application must also be deployed with my application.exe. Thanks.

> >I have a library of classes. Some of my applications don't need all the
> > classes in the library.  I assume if I import this class library into an
[quoted text clipped - 28 lines]
> hope that helps..
> Imran.

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.