5 comments
Comment actions Permalink

Yeah,

I was referring to the row++ which was flagged incorrectly.

You could definitely use ReSharper to refactor that line of code ;)

Legacy code ;) I inherited


0
Comment actions Permalink

The full picture is not clear from your post, but I ould guess that the
modified value of the 'row' variable (after row++) is not used

--
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Jake" <someone@aristocrat-inc.com> wrote in message
news:eb8h6u$2vu$1@is.intellij.net...

Invalid warning, stating that "Value assigned is not used in any execution
path".

>

see screenshot for details

>



0
Comment actions Permalink

Yes I was referring to the row++ & here is the actual line of code

new RectangleF(HeaderLeftMargin + (LargeIndent * col), (DetailTopMargin +
(DetailHeight * row++)), HeaderWidth, DetailHeight)
row++ gets flagged with the following message "Value assigned is not used in
any execution path" and row++ is being used here





"Eugene Pasynkov (JetBrains)" <Eugene.Pasynkov@jetbrains.com> wrote in
message news:eb9avq$ti9$1@is.intellij.net...

The full picture is not clear from your post, but I ould guess that the
modified value of the 'row' variable (after row++) is not used

>

--
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Jake" <someone@aristocrat-inc.com> wrote in message
news:eb8h6u$2vu$1@is.intellij.net...

>> Invalid warning, stating that "Value assigned is not used in any
>> execution path".
>>
>> see screenshot for details
>>
>>
>



0
Comment actions Permalink

Hello Jake

DetailHeight * row++;

shares the same semantics as

DetailHeight * row;
row = row + 1;

Therefore ReSharper notifies you that the variable row is not accessed after
the incrementation it and before it goes out of scope.

Cheers

--
Gabriel Lozano-Morán
The .NET Aficionado
http://www.pointerx.net

"Jake" <someone@aristocrat-inc.com> wrote in message
news:ebacsm$q4a$1@is.intellij.net...

Yes I was referring to the row++ & here is the actual line of code

>

new RectangleF(HeaderLeftMargin + (LargeIndent * col), (DetailTopMargin +
(DetailHeight * row++)), HeaderWidth, DetailHeight)
row++ gets flagged with the following message "Value assigned is not used
in any execution path" and row++ is being used here

>
>
>
>
>

"Eugene Pasynkov (JetBrains)" <Eugene.Pasynkov@jetbrains.com> wrote in
message news:eb9avq$ti9$1@is.intellij.net...

>> The full picture is not clear from your post, but I ould guess that the
>> modified value of the 'row' variable (after row++) is not used
>>
>> --
>> Eugene Pasynkov
>> Developer
>> JetBrains, Inc
>> http://www.jetbrains.com
>> "Develop with pleasure!"
>> "Jake" <someone@aristocrat-inc.com> wrote in message
>> news:eb8h6u$2vu$1@is.intellij.net...
>>> Invalid warning, stating that "Value assigned is not used in any
>>> execution path".
>>>
>>> see screenshot for details
>>>
>>>
>>
>>
>



0

Please sign in to leave a comment.