Cursos /
C# Basics
else Keyword
There is an else
keyword which can be used for executing a block of code if the condition is not met.
Syntax:
Example:
main.cs
The following diagram explains the flow of if-else statement:
![](https://codefinity-content-media-v2.s3.eu-west-1.amazonaws.com/courses/a5c23211-8dc2-4c4a-9a83-07a51e843ab6/section_4/sharp_exp_3%404x.png)
Tudo estava claro?
Seção 3. Capítulo 7
Conteúdo do Curso
C# Basics
C# Basics
else Keyword
There is an else
keyword which can be used for executing a block of code if the condition is not met.
Syntax:
Example:
main.cs
The following diagram explains the flow of if-else statement:
![](https://codefinity-content-media-v2.s3.eu-west-1.amazonaws.com/courses/a5c23211-8dc2-4c4a-9a83-07a51e843ab6/section_4/sharp_exp_3%404x.png)
Tudo estava claro?
Seção 3. Capítulo 7