Hi friends
What is the difference between using Load,LoadFrom and LoadFile methods of the Assembly class.Also wanted an example of use of reflection for Late Binding
Thanks
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
CrishPosted May 6, 2010, 4:53 AM
http://www.proprofs.com/forums/index.php?showtopic=13287
http://msdn.microsoft.com/en-us/library/b61s44e8.aspx
will helpful for you.
Vipul KelkarPosted May 6, 2010, 4:22 AM
Jaish MathewsPosted May 6, 2010, 3:52 AM
You should never use Assembly.LoadFile(). Use LoadFrom() if you know where the assembly is located, use Load() to let .NET figure out where the assembly is located. Using Load() should be your preference but may require a .config file to help .NET find the assembly like below
Differentiate LoadFrom and LoadFile
Use the LoadFile method to load and examine assemblies that have the same identity, but are located in different paths. LoadFile does not load files into the LoadFrom context, and does not resolve dependencies using the load path, as the LoadFrom method does. LoadFile is useful in this limited scenario because LoadFrom cannot be used to load assemblies that have the same identities but different paths; it will load only the first such assembly.