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
As per this link, IF vs Switch comparison of iteration test using switch and if statement, is like for 1,000,000,000 iterations, Time taken by Switch Statement=43.0s & by If Statement = 48.0s
Which is literally 20833333 iterations per second, So, Should we really need to focus more,
P.S:Just to know the performance difference for small list of conditions.