views:

21

answers:

1

Is there something that can do reverse "surround with"?

From:
((Type)myobject);

To:
(Type)myobject;

From:
if/while/try/using... {
lots of code here....
}

To:
lots of code here....

+1  A: 

Try structural search and replace (see JetBrains .NET tools blog, JetBrains TV for additional guidance)

For your first example, you can use the following pair of patterns:

Search pattern: (($type$) $var$) Replace pattern: ($type$) $var$

where $type$ is a type placeholder, and and $var$ is an identifier placeholder.

To play a bit more with structural search and replace, you might want to download a sample SSR pattern catalog from ReSharper web site

gorohoroh