Resharper: vars

后端 未结 8 2110
闹比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:40

    I saw a video from Hadi Hariri, where he was presenting Resharper 6.x. His reasoning was, if you are forcing a user to use "var", you are actually forcing him to name the variable in a more meaningful way, that way all the names are readable and make more sense.

提交回复
热议问题