您的位置:首页 > 编程语言 > C#

如何关闭ReSharper中的[ Use 'var' ]提示How to Disable C# “var” Recommendation in ReSharper

2012-02-15 21:26 561 查看
最近装上了ReSharper,确实是个很不错的工具,代码如果写得不规范他会提示,而且可以根据自己公司的需求自定义代码规范。

默认设置的提示已经相当完美,但美中不足就是老提示你用var来代替所有类型。个人实在是不喜欢var这个东西。

To disable these suggestions, do the following:
Go to the ReSharper menu and select Options…
From the resulting dialog box, select Code Inspection, Inspection Severity.
Select the C# tab and then Language Usage Opportunities.
Set both “Use ‘var’ keyword when initializer explicitly declares type” and “Use ‘var’ keyword when possible” to “Do not show”.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐