ReSharper will provide an option to remove this kind of code only if it's redundant. I beleive removing a needed 'while' cycle can completely break down the logic and workflow of the code.
Thanks. What I mean is not a ReSharper suggestion to improve code, it's an action deliberately chosen by a coder when construcing code :). Just like I can select lines of code and perform "Surround with". I should be able to reverse that action anytime.
To reverse a Surround With... simply use Ctrl-W (expand selection) in combination with copy/paste.
For a simple "if()" statement, put your cursor in the body, hit Ctrl-W until the entire body of the if() is selected, hit Ctrl-C to copy, hit Ctrl-W again to expand the selection to the entire if() statement, then hit ctrl-V to paste. The body replaces the if(), and you've just "Un-surrounded-with".
Thanks. What I mean is not a ReSharper suggestion to improve code, it's an action deliberately chosen by a coder when construcing code . Just like I can select lines of code and perform "Surround with". I should be able to reverse that action.
Hi,
ReSharper will provide an option to remove this kind of code only if it's redundant. I beleive removing a needed 'while' cycle can completely break down the logic and workflow of the code.
Thanks.
Thanks. What I mean is not a ReSharper suggestion to improve code, it's an action deliberately chosen by a coder when construcing code :). Just like I can select lines of code and perform "Surround with". I should be able to reverse that action anytime.
To reverse a Surround With... simply use Ctrl-W (expand selection) in
combination with copy/paste.
For a simple "if()" statement, put your cursor in the body, hit Ctrl-W until
the entire body of the if() is selected, hit Ctrl-C to copy, hit Ctrl-W
again to expand the selection to the entire if() statement, then hit ctrl-V
to paste. The body replaces the if(), and you've just "Un-surrounded-with".
"CH Loh" wrote in message
news:32650232.24061363051750868.JavaMail.devnet@confluence.jetbrains.net...
Thanks. What I mean is not a ReSharper suggestion to improve code, it's an
action deliberately chosen by a coder when construcing code
. Just
like I can select lines of code and perform "Surround with". I should be
able to reverse that action.
---
Original message URL: http://devnet.jetbrains.net/message/5481475#5481475
Thanks, a workaround if there's no such feature :).