Code Issues hints for expressions
Here are the code issues for different expressions. If the fix is applied, following a hint it may optimize the code and/or improve its readability.
Here are the code issues for different expressions. If the fix is applied, following a hint it may optimize the code and/or improve its readability.
There are times when you realize that a local variable or a field reference within a method would be more useful if it was a parameter. Having a new parameter on a method will increase its flexibility for consumers. To convert the local variable, you should remove its declaration from the body of the method, add it as a parameter and replace all occurrences of a local to a new parameter. The same steps must be performed in the case of field references. Furthermore, all method references in the entire solution should be updated to pass a new value as an argument to a method with a new signature.
We already reviewed the refactorings for anonymous methods and lambda expressions and know how to deal with these language structures. Now its time to review what Code Issues for anonymous methods and lambda expressions CodeRush Pro provides.
After DXCore has parsed the source code and built an abstract source tree for the active source file, you can navigate between its nodes and detail nodes by using the special navigation feature shipped with CodeRush. The feature is called the Expression Focus. It allows you to navigate between the smallest parts of the source tree – expressions.