删除Visual Studio中未使用的使用是一种很好的做法? [英] Remove Unused Usings in Visual Studio is a good practice?

查看:69
本文介绍了删除Visual Studio中未使用的使用是一种很好的做法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



在Visual Studio中删除未使用的用法是一种很好的做法?

删除未使用的Usings的任何缺点?

解决方案

是的,它是。



如果您执行代码分析,如果您有任何未使用的警告,微软会将其显示为警告。



为什么要使用任何未使用的东西?


这不仅是一种很好的做法,也是必须的。我也想要删除未使用的引用。您应该始终严格删除未使用的所有内容,并将其作为所有工程分支中最重要的工程原则之一,而不仅仅是软件。



-SA

Hi Everyone,

Removing Unused Usings in Visual Studio is a good practice?
Any drawbacks of removing unused Usings?

解决方案

Yes, it is.

If you perform code analysis, microsoft would show it as a warning if you have any unused warnings.

Why use anything which is not in use?


This is not only a good practice, it''s a must. I would rather like to have "Remove unused references", too. You should always rigorously remove everything unused and take it as one of the most important engineering principles, in all branches of engineering, not only software.

—SA


这篇关于删除Visual Studio中未使用的使用是一种很好的做法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆