Suggestion "Introduce variable out of block"


Have some suggestion, lets see at

try
{
int a = int.Parse(s/some string variable/)
}
catch
{
//something else, for ex. a = 0;
}

Use(a);

at this case, variable a is hidden to use in function Use, so we must take
introducing variable a out of try block

so, my suggestion: for bulb menu item "split introduse and...", if
variable is in block and this variable use out of block -- take variable
introduce out of block scope

--
ïÔÐÒÁ×ÌÅÎÏ M2, ÒÅ×ÏÌÀÃÉÏÎÎÏÊ ÐÏÞÔÏ×ÏÊ ÐÒÏÇÒÁÍÍÏÊ Opera:
http://www.opera.com/mail/

1 comment
Comment actions Permalink

Put a good word for this request:
http://www.intellij.net/tracker/resharper/viewSCR?publicId=5114
It's exactly what you're looking for.


"Airex" <airex.s@gmail.com> wrote in message
news:op.s417a9wjyg18dx@w-skachkovsky.lana.vl.net.ua...

Have some suggestion, lets see at

try
{
int a = int.Parse(s/some string variable/)
}
catch
{
//something else, for ex. a = 0;
}

Use(a);

at this case, variable a is hidden to use in function Use, so we must take
introducing variable a out of try block

so, my suggestion: for bulb menu item "split introduse and...", if
variable is in block and this variable use out of block -- take variable
introduce out of block scope

--
ïÔÐÒÁ×ÌÅÎÏ M2, ÒÅ×ÏÌÀÃÉÏÎÎÏÊ ÐÏÞÔÏ×ÏÊ ÐÒÏÇÒÁÍÍÏÊ Opera:
http://www.opera.com/mail/


0

Please sign in to leave a comment.