Resharper: vars

后端 未结 8 2119
闹比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条回答
  •  悲哀的现实
    2020-12-01 11:35

    Vars help to make the code more readable inside a method, especially if you use generics.

    As Jon says, it is just an option.

提交回复
热议问题