Hi.
Can any one tell me what is difference beyween a c# .dll and .exe files..and how can we add assemblies in a program.
C# .dll and .exe
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
VulpesRank #55 · 29.2K reputationPosted Feb 4, 2012, 10:55 AM EST
http://www.c-sharpcorner.com/Forums/Thread/159615/exe-and-dll-file-in-C-Sharp.aspx
You can add references to other assemblies (normally .dlls) to your program using the /reference (or just /r) compiler switch:
http://msdn.microsoft.com/en-us/library/yabyz3h4(VS.80).aspx
If you're using Visual Studio, the IDE will do this for you if you right click on your project in Solution Explorer, choose Add Reference from the dropdown list, navigate to the assembly you want and OK it.
Satyapriya NayakRank #47 · 31.5K reputationPosted Feb 4, 2012, 7:02 PM EST
1.EXE is an extension used for executable files while DLL is the extension for a dynamic link library.
2.An EXE file can be run independently while a DLL is used by other applications.
3.A DLL file can be reused by other applications while an EXE cannot.
4.Exe is for single use whereas you can use Dll for multiple use
5.Dll is an In-Process Component whereas EXE is an OUt-Process Component.
6.You can create an objects of Dll but not of the EXE.
Thanks
Satyabrtata Saha8 reputationPosted Feb 11, 2012, 6:16 PM EST