if Statement
The if statement executes a block if the condition is true.
int temperature = 25;if (temperature > 20){ Console.WriteLine("It's warm outside.");}Run the Application
Section titled “Run the Application”dotnet runResult
Section titled “Result”It's warm outside.