Link to home
Start Free TrialLog in
Avatar of kishore_peddi
kishore_peddi

asked on

Difference between "Assembly.Load" & "Assembly.LoadFrom" & "Assembly.LoadFile" in VB.NET / C#

Hi,

Can you please explain me what is the difference between "Assembly.Load"  &  "Assembly.LoadFrom"  &  "Assembly.LoadFile" in VB.NET or C# with simple examples ? Need simple explanation for me to understand the basic concept.

Thanks
Avatar of JimBrandley
JimBrandley
Flag of United States of America image

Given an assembly name, load the assembly:
Assembly.Load(MyAssembly);

Given an assembly file name, load the assembly:
Assembly.LoadFile( "MyAssembly.DLL");
OR
Assembly.LoadFrom("MyAssembly.DLL");

The second form is supported by the compact framework. The later two methods can also take varification that you have permission to access the assembly. See:
ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.NETDEVFX.v20.en/cpref11/html/T_System_Security_Policy_Evidence.htm

Jim
ASKER CERTIFIED SOLUTION
Avatar of patilmmilind
patilmmilind

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial