Conditional Statements
Conditional statements execute different code blocks based on boolean expressions.
int age = 18;if (age >= 18){ Console.WriteLine("You are an adult.");}Run the Application
Section titled “Run the Application”dotnet runResult
Section titled “Result”You are an adult.