Use Load or LoadFrom to load an assembly

  • Thread starter Thread starter Karen
  • Start date Start date
K

Karen

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


Thanks
Karen
 
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,
 
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,
 
Back
Top