Code Issues of the dead code type for qualifiers
Here are some of the code issues of the dead code type that indicate redundant ‘this’ (‘Me’ in VB), ‘base’ (‘MyBase’ in VB) and type qualifiers.
Here are some of the code issues of the dead code type that indicate redundant ‘this’ (‘Me’ in VB), ‘base’ (‘MyBase’ in VB) and type qualifiers.
Here are two code issues of the warning type that might be helpful in detecting objects of a class that have not undisposed. Such objects may lead to temporary unmanaged resource leaks.
In addition to code issues specific for declaring types, CSharp and Visual Basic language specifications have a few restrictions on declaring constant or simple variable declarations. Having this issue in the code editor right in front of a developer allows him to fix the issue immediately without compiling the project.
The CSharp and Visual Basic programming language specifications have several restrictions on how type elements such as a class, structure, and delegate are declared in the code. Let’s review code issues that demonstrate an incorrect type declaration, and see the error before the compiler informs us about it when we build the code.
We are going to review the CodeRush code issues dedicated to C# language limitations for the following keywords: ‘base’, ‘this’, ‘yield’, ‘params’ and ‘Me’, ‘ParamArray’ keywords in Visual Basic. Here’s a brief overview of keywords:
One of the goals of the Code Issues technology is to help you find mistakes when coding before compiling. This increases the coding speed and allows you to save time in the future when dialing with those mistakes. Let’s take a look at code issues CodeRush provides specific to declaring members:
CodeRush Duplicate Code Detection (DDC) analysis runs in the background while you work in the Visual Studio IDE. Visual Studio 2011 Developer Preview has a similar feature called Code Clone Analysis (CCA). Both features find code duplications, so it is possible to undertake a brief overview of each feature and compare them. Please note that this article was written using the Visual Studio 11 Developer Preview, and as such, certain functionality may be subject to change before the final release. The version of the IDE Tools/CodeRush used for comparison is 11.2, which is certainly subject to change.
Duplicate Code Detection options are available at the Editor | Code Analysis | Duplicate Code options page in the Options Dialog. Duplicate code options specify when detection analysis is activated and the analysis level. Here’s what this page looks like: