Archive

Archive for 2012

CodeRush Dynamic Lists option page

October 23rd, 2012 Comments off

Dynamic lists are configurable on the Dynamic Lists option page. The page is language-dependent, so you can create and use language-specific dynamic lists. Here is what it looks like:

Read more…

CodeRush Dynamic templates and dynamic lists

October 23rd, 2012 Comments off

Template dynamic lists make a single code template universal and dynamic. For instance, a template for a variable declaration can be configurable on the fly by specifying its type. In other words, a template can be expanded differently depending on the selected dynamic list. A dynamic list contains a list of possible template alternative expansions (types when used with a variable template) for a single template.

Read more…

Code Issues – Member can be static

October 18th, 2012 Comments off

Cause:

Static members are part of a type and non-static members are part of an instance of that type. If you want to have a shared state or a function between different instances of the same type, a static member will be helpful. This code issue informs you about an instance member that can be converted into a static member.

Read more…

Code Issues – Undeclared element

October 18th, 2012 Comments off

Cause:

Highlights identifier references to local variables, fields, method, properties, classes, structures, interfaces and everything that is not yet declared.

Read more…

Code Issues – Format item index too large

October 18th, 2012 Comments off

Cause:

In the String.Format call you can specify any number of arguments and the corresponding format items, where those argument values will be inlined. When the corresponding argument in the call is absent, the FormatException will be thrown (Index (zero based) must be greater than or equal to zero and less than the size of the argument list). The compiler does not validate the format items, so this may lead to errors in your application. This code issue allows you to avoid such errors by highlighting format items with an incorrect index.

Read more…

Code Issues – Control cannot leave the body of a finally clause

October 18th, 2012 Comments off

Cause:

Returns are forbidden in finally clauses by the compiler. A compiler error will occur in case of a return statement inside a finally block, and refuse to let you write such potentially ambiguous and confusing code. The purpose of a finally statement is to ensure that the necessary cleanup of objects happens immediately and always. In other words, it is designed for releasing all locks and resources and cannot leave the block until finishing the cleanup task.

Read more…

Code Issues of the dead code type for members and blocks

October 18th, 2012 Comments off

Here are several of the code issues, which highlight redundant and unnecessary code blocks that may be safely removed for improving code readability.

Read more…

The References tool window also known as Find All References

October 12th, 2012 2 comments

The References tool window is designed to search, navigate and review the identifier references in the entire solution. This is what it looks like:

CodeRush References Tool Window

Read more…