c# – What are the advantages of creating dll's in the project and not putting the classes directly in it?

Question:

In the company where I work they use many DLL's and I have a lot of difficulty in debugging and understanding this… In my (personal) projects I always put the classes directly in the same and I don't do like them, I think it's much easier that way, what's the advantage of use DLL? remembering that I program in ASP.NET C#.

EDIT: I have access to the DLL's source code, but one of the problems is, the API key I call is inside the DLL, if this key expires I don't get a specific error, I can't debug the method inside the DLL DLL because when I import the DLL I can only read the verb of the methods and the name of the attributes. I can only debug if I open the DLL project and run it inside.

Answer:

I don't know if there are more reasons, but here are the ones I know:

  • When you have large projects, compilation time starts to be a problem, so you can compile DLLs as they are changed, or for example, after the software is sold, it allows you to make updates in a simple way.
  • Allows you to load and release as needed in order to save machine resources.
  • Organize and distribute project modules in a simpler way.
  • Make code reusable
Scroll to Top