Static Assembly vs Dynamic Assembly in C#

In this article we will discuss about what is the difference between Static Assemblies ans Dynamic Assemblies.
  • 16227
Static Assemblies are those Assemblies which are stored on the disk permanently. They may include .NET Framework classes, interfaces as well as resource file. These assemblies are not loaded directly from the memory instead they are directly loaded from the disk when CLR (Common Language RunTime) requests for them. These Assemblies used to store on the disk as a file or set of file. Whenever one compiles the C# code, one gets STATIC assemblies.

Dynamic assemblies are those assemblies which are not stored on the disk before execution in fact after execution they get stored on the disk. When .NET runtime calls them they are directly loaded from the memory not from the disk. Reflection emit provides many ways to create dynamic assemblies means These are created in the memory using System.Reflection.emit namespace.The System.Reflection.Emit namespace contains classes that allow a compiler or tool to emit metadata and Microsoft intermediate language (MSIL) and optionally generate a PE file on disk. When an application requires the types within these assemblies these dynamic assemblies are created dynamically at run time

Further Readings
 
You may also want to read these related articles.
  • Dynamically Loading an assembly at Runtime and calling its methods

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here


© 2020 DotNetHeaven. All rights reserved.