C# Assembly, EXE and DLL

Introduction

 
In this blog, we are discussing the importance of Assembly, EXE, and DLL.
 

What is Assembly?

 
Assembly is a precompiled chunk of .NET code that can be run by CLR. In other words, it is nothing but a single unit of deployment.
 
We have various types of assemblies such as DLL and EXE. If you add any library to our project it will become DLL. DLL stands for dynamic link library.
 

What is the difference between DLL and EXE?.

 
DLL
EXE
DLL actually run the address space of the EXE
Actually, EXE runs its own address or memory space.
Executing the DLL hoster required
EXE runs without hoster
Easy to reuse
We cannot reuse EXE
The purpose of a DLL is to have a collection of methods/classes which can be re-used from some other application.
The purpose of an EXE is to launch a separate application of its own.
DLL there is no entry point
EXE there is some entry point
DLL execution is very Fast
EXE execution is slow
DLL there no any entry points available
EXE has the main entry point available
DLL can be shared with other applications.
EXE cannot be shared with other applications.
DLL can be versioned
EXE cannot be versioned
 

Summary

 
In this blog, we discussed .NET, DLL, EXE, and Assembly.
Next Recommended Reading How to run .EXE on button click in C#