Re: Why we make a DLL file
Let me put it this way... what if Microsoft decided that the ADO.NET shouldn't be in its own DLL, and just shoved it straight into the IDE exe? You would no longer be able to set a reference to ADO.NET and use it. You would be forced to write all of your own database connection code yourself. From scratch. Everytime.
Same thing about any other DLL... the idea is that you can write it once, compile it and use it anywhere else. Yes, you could in theory write everything all in one app. For small apps, that's probably fine... the stuff I work on has tens of thousands of lines of code... I don't think we really want to put that all into one project. It would get tangled up and become a mess. Also, if we make a change to one part of the app, we can simply replace that one DLL with out having to touch or redeploy the exe.
-tg