It then removes all other Using statements not needed by the project. Internally Visual Studio scans through the code and determines the using statements that are necessary for the code to compile. You will find that all unnecessary using directives have been removed. Right-click in your Code behind file > Organize Usings > Remove Unused Usings If you are using a C# code template (VS 20), you can do the following: So after you have finished coding, it’s a good idea to remove unused references as well as assemblies from your project to improve code readability, maintainability as well as gain a slight advantage in the applications load time. Just create any new Window, Web, Console or Silverlight project using Visual Studio and check the using directives (only in C# templates) as well as the assemblies that get added. When you create a default project in Visual Studio, there are a couple of references and assemblies that get added by default.
0 Comments
Leave a Reply. |