Local variables or direct statements?

前端 未结 7 1538
旧时难觅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:48

    Heres the rule I use: Keep it on one line if you can quickly glance over it and know exactly what it's saying. If its too complicated to read as quickly as you could read any other text, give it a local variable. In any case, though, you don't want a really long if statement header. So if it's too long, split it up.

    0 讨论(0)
提交回复
热议问题