如何关闭ReSharper中的[ Use 'var' ]提示

ReSharper,确实是个很不错的工具,代码如果写得不规范他会提示,而且可以根据自己的需求自定义代码规范。

默认设置的提示已经相当完美,但美中不足就是老提示你用var来代替所有类型。在网上找了下,下面就是修改的办法,特记下来。

 

To disable these suggestions, do the following:
  1. Go to the ReSharper menu and select Options…
  2. From the resulting dialog box, select Code Inspection, Inspection Severity.
  3. Select the C# tab and then Language Usage Opportunities.
  4. Set both “Use ‘var’ keyword when initializer explicitly declares type” and “Use ‘var’ keyword when possible” to “Do not show”.
posted @ 2013-11-07 14:19  粤木湖  阅读(508)  评论(0)    收藏  举报