Telerik® JustCode™ by Progress

Telerik® JustCode™ can suggest you to add missing switch statement cases.

Note

Language Support

Supported: C#, VB.NET

Not supported: JavaScript

Not irrelevant: ASP.NET, XAML, HTML

The behavior can be controlled in JustCode Options - JustCode / Options / Code Analysis / Hints / C#.

When "Add missing switch statement cases" option is checked in the options dialog, then Telerik® JustCode™ suggests you to add missing switch statement cases when the checked expression is enum and there is no default cases.

To add missing switch statement cases

  1. Position the caret on the switch statement you'd like to add missing cases for.

  2. Select Add missing switch statement cases from the VisualAid's Fixes menu.

    Add Missing Switch Statement Cases
  3. The result is:

    Add Missing Switch Statement Cases Result

See Also