Creates a switch statement

    0

    8

    lucycodes42

    C# recipes

    This code will execute the code inside the case statement if the value is equal to value1, and it will break out of the switch statement if any other value is input.

    Shortcut: switch

    switch (value)
    {
      case value1:
        break;
      default:
        break;
    }
    
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Explore
    • Cookbooks
    • Playground
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.