Answer:
Both methods are used to load the assemblies. we can then extract all the metatdata of the assembly using Reflection.
Difference:
1)LoadFrom can use either the name or the path of the assembly,
LoadFile will expect the path of the assembly(see the overloaded versions)
2)LoadFrom uses a probing algorithm to find the assembly.f if you have two assemblies that have the same identity but different locations, you can get some unexpected behavior.But using LoadFile, you can load the desired assembly as needed.
Source: http://www.codeproject.com | Asked In: Many Interviews |
Alert Moderator