Is there a Resharper command to define a variable in block above?

Hi,

I would like variable to be defined in a scope one level higher... Is there any magical command to do that?

Screenshot_073113_095817_AM.jpg

Bonus question: Is there any modifier to tell "initialise with default value"? Otherwise there would be an error: "Local variable might not be initialised before accessing".

Thanks for support.
MIchal

2 comments
Comment actions Permalink

Replying to own thread.

ALT + ENTER: split declaration and initialisatio
ALT + ENTER: move to outer scope

If there is singe shortcut doing exactly that - appreciated.

0
Comment actions Permalink

This is one of those cases were the ability to write (or record) simple macros that could string together multiple R# commands into one would be really useful

0

Please sign in to leave a comment.