Should I *always* favour implictly typed local variables in C# 3.0?

后端 未结 12 531
梦如初夏
梦如初夏 2020-12-09 15:48

Resharper certainly thinks so, and out of the box it will nag you to convert

Dooberry dooberry = new Dooberry();

to

var doo         


        
12条回答
  •  一生所求
    2020-12-09 16:23

    There was a good discussion on this @ Coding Horror

    Personally I try to keep its use to a minimum, I have found it hurts readability especially when assigning a variable from a method call.

提交回复
热议问题