What is the benefit/downside to using a switch statement vs. an if/else in C#. I can\'t imagine there being that big of a difference, other than m
I Think Switch Is More Faster Than If Conditions like see if There is a program like :
Write a Program to enter any number (between 1 – 99) and check it is in which slot a) 1 – 9 then slot one b) 11 – 19 then slot two c) 21-29 then slot three and so on till 89-99
Then On If You Have Have To Make Many Conditions But Son Switch Case You Have TO Just Type
Switch ( no /10 )
and on case 0 = 1-9 ,case 1 = 11-19 and so on
it will Be So Easy
There Are Many More Such Examples Also!