Quantcast
Channel: switch/case with string
Viewing all articles
Browse latest Browse all 13

switch/case with string

$
0
0

Does C# optimize switch/case for strings in any way such that it is more efficient than a series of if-else(s) ? For example, the C++ compiler can use jump tables for switch/case with integers. (Note: this is not a C++ vs. C# focus, I am just using what I have seen the C++ compiler do as an example of an optimization).

 

Thank You


Viewing all articles
Browse latest Browse all 13

Trending Articles