This article is a mirror article of machine translation, please click here to jump to the original article.

View: 28098|Reply: 0

[Source] VS 2019 (Visual Studio) code cleanup

[Copy link]
Posted on 6/27/2020 9:12:51 PM | | | |
This article uses Visual Studio 2019 version, using the code cleaning function to make your code clearer, improve the programming specification, and fix some warnings.

For C# code files, Visual Studio 2019 has a Code Cleanup button at the bottom of the editor (keyboard: "Ctrl" + "K", "Ctrl" + "E"), or in the VS toolbar: Analyze -> Code Cleanup. As shown below:



Common configurations are as follows:



Before cleaning:



After cleanup:



Remark:You can clean up the code for the entire project or solution





Previous:CentOS 7 uses crontab to perform tasks at regular intervals
Next:Ocelot Series (1) ASP.NET Core Gateway in practice
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com