We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When using Exit Select in VB, the converter generates duplicate break statements in C#.
Exit Select
break
Class A Public Function Add(ByVal x As Integer) As Integer Select Case x Case 1 Exit Select End Select Return 3 End Function End Class
class A { public int Add(int x) { switch (x) { case 1: { break; break; } } return 3; } }
class A { public int Add(int x) { switch (x) { case 1: { break; } } return 3; } }
warning CS0162: Unreachable code detected
The text was updated successfully, but these errors were encountered:
Yep I'm guessing it just always sticks a break at the end, just linking #432 for reference
Sorry, something went wrong.
Interestingly it doesn't - I had to add the if statement in #432 to trigger it - if you just have Select Case x Case 1 Return 3 the break isn't added.
if
Select Case x Case 1 Return 3
afaf706
GrahamTheCoder
No branches or pull requests
When using
Exit Select
in VB, the converter generates duplicatebreak
statements in C#.Input code
Erroneous output
Expected output
Details
The text was updated successfully, but these errors were encountered: