DEV Community

Discussion on: Don't use String.ToLower() in C# when comparing strings

Collapse
 
davidkroell profile image
David Kröll

I'm not sure if this works. I'm not that familiar with how switch statements actually compare the things.
In fact, during lowering (a step in compilation) the switch is transformed to an nested if, in some cases to a binary search tree to optimize for efficiency.