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.
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Satyabrtata SahaPosted Feb 11, 2012, 11:16 PM
Satyapriya NayakPosted Feb 5, 2012, 12:02 AM
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
VulpesPosted Feb 4, 2012, 3:55 PM
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.