ReSharper的:瓦尔 [英] Resharper: vars
问题描述
为什么ReSharper的想你改变最大变量VAR类型,而不是实际的类型在code?
Why does Resharper want you to change most variables to var type instead of the actual type in the code?
推荐答案
这只是一种选择。您可以禁用它:
It's just an option. You can disable it:
ReSharper的 - >选项 - > code检查 - >检验严重性 - > code Redundencies - >使用无功的关键字在可能的情况:更改为不显示
ReSharper -> Options -> Code Inspection -> Inspection Severity -> Code Redundencies -> Use 'var' keyword where possible: change this to "Do not show"
还有上下文(灯泡)选项,将带您在每个方向 - 这是在ReSharper的 - >选项 - >语言 - > C# - >上下文操作 - >替换显式类型声明与'变种'
There's also the context (lightbulb) option which will take you in each direction - this is under ReSharper -> Options -> Languages -> C# -> Context Actions -> "Replaces explicit type declaration with 'var'"
这篇关于ReSharper的:瓦尔的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!