Search code examples
c#using

How can I add automatic reference to All of Class , ... in my project?


I have Dll that use all of project. I add Dll to reference . When I need Dll I must use of code in head :

Using MyDlls;

How can I add MyDlls to all of class,... automatic ?


Solution

  • If you're working with Visual Studio, you might want to use the Quick Actions to include a missing namespace reference, either by right clicking on the type or by pressing CTRL + . and hitting ENTER:

    enter image description here

    This approach doesn't include all namespace references, but helps managing namespace references without adding using statements manually, while keeping your header as clean as possible.