Try pasting this code somewhere in a method (notice the extra '('):
int x;
if (x == 0)
return true;
else if ((x == 1)
return false;
selecting the first if and choosing "convert to switch" causes a null reference exception.
Description
Try pasting this code somewhere in a method (notice the extra '('):
int x;
if (x == 0)
return true;
else if ((x == 1)
return false;
selecting the first if and choosing "convert to switch" causes a null reference exception.