0
What is the difference between if-else if statement and switch statement?
C#
2 Answers
+ 7
The fundamental difference between if-else and switch statement is that the if-else statement. selects the execution of the statements based upon the evaluation of the expression in if statementsâ. The switch statements âselects the execution of the statement often according to a keyboard command
+ 1
Mohamed Waseem
Main difference is that you use switch when you have constant values.
When using if-statements, you can ask for more specific conditions like: <, >, etc.