The C# -> MSIL compiler (not the jitter) translates switches with odd* cases into an if/elseif/elseif .. etc ../else block.
*: such as when you have the cases 0, 3, 20 and 1000 for example. They will be ordered ascending. (I have checked this with ILDasm)
Also, considering the IL opcode of...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.