if

The if statement is a fundamental control structure that allows your program to make decisions based on conditions. It executes code only when a specified condition is true.

More in C#

  1. Primitive data types
    1. Accessors
      1. Foreach
      2. For
    2. Types
      1. Int
      2. Float
      3. Bool
      4. char
    3. Values
      1. Literal
  2. Non-primitive data types
    1. Structs
    2. Classes
      1. Methods
      2. Fields
    3. Data structures
      1. Arrays
      2. Lists
    4. strings
  3. Control Flow
    1. Loops
    2. Conditionals
      1. else if
      2. return
      3. Else
      4. if
  4. Expressions & Operators
    1. Arithmetic
    2. Assignment

All 48 topics in the Fundamentals Program