Most of the people know that switch works like if-else blocks. The only difference between the switch and if-else is its being for the many conditional states, and also writing switch is more simple than if-else block. This knowledge is really a big mistake because switch has a different algorithm and working-procedure comparing to if-else block. To demonstrate this, I wrote a simple example which indicates the performance differences between switch and if-else in many different situations.
Search
Categories
- .Net (19)
- C# (12)
- General (13)
- Open Source Projects (4)
- Quantum (1)
- Tools (9)
- Visual Studio (6)