Reverse assignments Permanently deleted user Created April 16, 2009 16:23 I have a developer that loves writing code ala:if ( null == foo )vs.if ( foo == null )Is there a way of creating a rule that will reverse this sort of thing?
Hello Thomas
You can find and replace such conditions using the following structural search pattern: null == $var$ where $var$ is and identifier (for more information on SSR please see http://www.jetbrains.com/resharper/webhelp/Navigation_and_Search__Structural_Search_and_Replace.html). Thank you!
Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"