This Question is Not Answered

1 "correct" answer available (4 pts) 2 "helpful" answers available (2 pts)
0 Replies Last post: Mar 5, 2014 3:07 AM by Simon McKenzie  
Simon McKenzie Newbie 1 posts since
Mar 5, 2014
Currently Being Moderated

Mar 5, 2014 3:07 AM

ReSharper 8.1 sometimes fails to optimise duplicate branches

I'm using ReSharper 8.1.23.546 and in some cases, ReSharper doesn't optimise duplicate branches. For example, ReSharper doesn't suggest anything for the following block:

 

bool test = bool.Parse("True");

 

if (test)
    Console.WriteLine();
else
    Console.WriteLine();

 

However, ReSharper does generate suggestions for the following code:


int a;
if (test)
    a = 1;
else
    a = 1;

 

Cheers,

 

Simon

More Like This

  • Retrieving data ...