C# Tutorial

C# If...Else

Conditional Statements

Use conditions to run different code paths based on logical tests.

int score = 88;
if (score >= 80) Console.WriteLine("B");
Try it Yourself
Run this CSHARP example in your local environment or course sandbox.