C# If ... Else If ... ElseC# support the following conditional statements:
ifto specify a block of code to be executed, if a specified condition is met and return true
elseto specify a block of code to be executed, if the same condition was not met and return false
else ifto specify a new condition other than
if, this condition will tested after first one
switchto specify many alternative blocks of code to be executed
C# If..Else if..else Syntax
C# if..else if..else Example
In this page (written and validated by A. Gawali) you learned about C# If ... Else If ... Else . What's Next? If you are interested in completing CS tutorial, your next topic will be learning about: CS Switch Statement.
Incorrect info or code snippet? We take very seriously the accuracy of the information provided on our website. We also make sure to test all snippets and examples provided for each section. If you find any incorrect information, please send us an email about the issue: email@example.com.