Home > Code Analysis > Code Issues – Redundant else statement

Code Issues – Redundant else statement

March 19th, 2011

Cause:

The else statement is redundant when it doesn’t contain any code, and can be safely removed to improve readability. The type of code issue is a dead code.

Sample:

CodeRush Redundant 'else' statement

How to fix:

CodeRush Redundant Else Statement Fix

—–
Products: CodeRush Pro
Versions: 12.1 and up
VS IDEs: any
Updated: Nov/12/2012
ID: C084

Similar Posts: