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 / .NET Framework / New Users / August 2004

Tip: Looking for answers? Try searching our database.

Use Load or LoadFrom to load an assembly

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Karen - 12 Aug 2004 15:06 GMT
Hi,
 Which method is recommended (load or loadfrom) for loading
assemblies, both in terms of performance and versioning of assmeblies?

Thanks
Karen
Ignacio Machin \( .NET/ C#  MVP \) - 12 Aug 2004 16:09 GMT
Hi,

It depends of the use you want, in LoadFrom you set the location of the
file , this should be faster than Load() which has to  look in several
locations , also in the latter you search by assembly name where in LoadFrom
you look by filename.

I would recommend to use Load(0 if that suits you.

Regarding speed LoadFrom() may be faster, it does not have to search on
several locations.

Cheers,

Signature

Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

> Hi,
>   Which method is recommended (load or loadfrom) for loading
> assemblies, both in terms of performance and versioning of assmeblies?
>
> Thanks
> Karen
Junfeng Zhang[MSFT] - 12 Aug 2004 23:38 GMT
Did you try it when you make the performance claim?

LoadFrom() is always slower than Load(), in v1.0 and v1.1, due the the
second Load() after LoadFrom().
http://blogs.msdn.com/suzcook/archive/2003/09/16/57247.aspx

Signature

Junfeng Zhang
http://blogs.msdn.com/junfeng
This posting is provided "AS IS" with no warranties, and confers no rights.

"Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us> wrote

> Hi,
>
[quoted text clipped - 16 lines]
> > Thanks
> > Karen
Ignacio Machin \( .NET/ C#  MVP \) - 13 Aug 2004 14:51 GMT
Hi ,

No I did not , in fact I have never had the need to load an assembly, it
was just a kind of "logic" assumption, LoadFrom may has to look in several
places , whether LoadFrom knows exactly where the assembly is located, so I
thought it should be faster.

As you pointed out I was wrong :)

My fault for giving an opinion lightly :)

Cheers,

Signature

Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

> Did you try it when you make the performance claim?
>
[quoted text clipped - 23 lines]
> > > Thanks
> > > Karen
Junfeng Zhang[MSFT] - 15 Aug 2004 20:25 GMT
If you read Suzanne's blog http://blogs.msdn.com/suzcook, you will know she
always recommend Assembly.Load().

Signature

Junfeng Zhang
http://blogs.msdn.com/junfeng
This posting is provided "AS IS" with no warranties, and confers no rights.

> Hi,
>   Which method is recommended (load or loadfrom) for loading
> assemblies, both in terms of performance and versioning of assmeblies?
>
> Thanks
> Karen

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.