Which is faster switch case or if-else in C#?

Switch is generally faster than a long list of ifs because the compiler can generate a jump table. The longer the list, the better a switch statement is over a series of if statements.

Sizin İçin Seçtik  Is 7G available in any country?

Leave a Reply

Your email address will not be published. Required fields are marked *