Local variables or direct statements?

前端 未结 7 1635
旧时难觅i
旧时难觅i 2021-01-25 23:55

I am currently studying C# and I really want to get a good coding style from the beginning, so I would like to hear opinions from you professionals on this matter.

Shoul

7条回答
  •  情书的邮戳
    2021-01-26 00:39

    I see a lot of example 1 in production code. As long as the expression is simple, and it's easy to understand the logic of what's happening, I don't think you'll find many people who think it is bad style.

    Though you will probably find a lot of people with different preferences. :)

提交回复
热议问题