I am converting some VB.NET code to C #, since I am more comfortable with it, and this helps me solve problems faster. However, I came across this code, which is NOT a bug in VB.NET, but converting it to C # generates a compiler error.
VB.NET Code
Select Case name Case "FSTF" ..... Case "FSTF" ..... End Select
Converted C # Code
switch(name) { case "FSTF": ....; break; case "FSTF": ....; break; }
And the error:
The case of the label "FSTF": "already occurs in this switch statement.
What is the solution here - does this mean that in the VB.NET code the second case statement was just a dummy - or was it the first case of a dummy?
source share