Resharper: vars

后端 未结 8 2122
闹比i
闹比i 2020-12-01 10:52

Why does Resharper want you to change most variables to var type instead of the actual type in the code?

8条回答
  •  猫巷女王i
    2020-12-01 11:43

    To answer your question ... because someone at JetBrains decided that was the "preferred" way.

    To change it follow Jon's answer. Additionally you can also change ReSharper's behavior when doing Code Cleanup (which I use a lot) under the Code Cleanup section in ReSharper options. Set to "Use Explicit Type".

提交回复
热议问题