A static class can be used as a unit of organization for sets of utility functions that operate on input parameters and do not have to get or set any internal data. These functions can be accessed without creating an instance of the class. In this case, a static class can make your implementation simpler and faster because you do not have to create an object in order to call its methods.
Read more…
The CodeRush Code Issues tool window shows a summary of code issues found inside the source code within an entire solution. It is intended to help you overview, analyze, navigate and fix issues such as errors, warnings, hints and dead code:
Read more…
CodeRush Code Issues configuration is available inside the IDE Tools Options Dialog and also in the Options Dialog of the Visual Studio. The main set of options is located on the Editor | Code Analysis | Code Issues options page:
Read more…
CodeRush Code Issues technology (also known as Code Analysis) is essentially background static analyzer of the source code. The code is analyzed during code writing and/or reading without compiling or executing the program.
One of the most prominent uses of a static analyzer is for code defect detection. While you’re working in the source code, it will point out the code errors even before it’s compiled, and other specifics that can help improve the overall quality of the source code. This can help you improve your coding practices, and learn new language technics. Static-analysis techniques can also detect buffer overflows, security vulnerabilities, memory leaks, timing anomalies (such as race conditions, deadlocks), dead or unused source code segments, and other common programming mistakes.
Read more…
Cause:
This code issue shows an error if a ‘try’ statement doesn’t have a ‘catch’ or ‘finally’ statement. The try block must be completed, whether with catch or finally blocks.
The try block contains the guarded code that may cause the exception. The block is executed until an exception is thrown or it is completed successfully.
Read more…
Cause:
A static constructor is used to initialize any static data, or to perform a particular action that needs performed once only. Parameters are not allowed for static constructors.
Read more…
This code issue shows an error when the structure is derived from a non-interface type. Structures can only inherit from other interfaces according to various language specifications.
Read more…
Cause:
This code issue shows a dead code when there are unreferenced private property setters. Unused property setters of private properties can be safely removed, which will improve code readability.
Sample:

How to fix:
- Apply the Remove Setter code fix:

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