I am converting some VB.NET code to C#, as I am more comfortable with it and it helps me in resolving issues faster. However, I came across this code which is NOT an error in VB.NET — but converting it to C# is generating a compiler error.
VB.NET Code
Select Case name
Case "FSTF"
.....
Case "FSTF"
.....
End Select
C# Converted Code
switch(name) {
case "FSTF":
....;
break;
case "FSTF":
....;
break;
}
And the error is:
The Label 'case "FSTF":' already occurs in this switch statement.
What is the solution here — does it mean that in the VB.NET code, the second case statement was just a dummy — or was the first case a dummy?