哪个会有益? [英] which will be beneficial?
本文介绍了哪个会有益?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
哪种情况将是有益的;是switch语句还是if语句?
Which condition will be beneficial; a switch statement or an if statement?
推荐答案
以下是一些有趣的讨论,可能会帮助您消除疑问:
http://stackoverflow.com/questions/449273/why-the- switch-statement-and-not-if-else [ ^ ]
http://channel9.msdn.com/Forums/TechOff/8393- Best-Practice-switch-vs-if-questions [ ^ ]
http://www.blackwasp.co.uk/SpeedTestIfElseSwitch.aspx [ http://social.msdn.microsoft.com /Forums/zh-CN/csharpgeneral/thread/416b4f5d-792d-4128-9491-70defa7a97d8/ [
Here are a few interesting discussions which might help you clear your doubts :
http://stackoverflow.com/questions/449273/why-the-switch-statement-and-not-if-else[^]
http://channel9.msdn.com/Forums/TechOff/8393-Best-Practice-switch-vs-if-questions[^]
http://www.blackwasp.co.uk/SpeedTestIfElseSwitch.aspx[^]
http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/416b4f5d-792d-4128-9491-70defa7a97d8/[^]
这篇关于哪个会有益?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文