Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The label 'label' already occurs in this switch statement
A label was repeated in a switch
statement.
The following sample generates CS0152:
// CS0152.cs
namespace MyNamespace
{
public class MyClass
{
public static void Main()
{
int i = 0;
switch (i)
{
case 1:
i++;
return;
case 1: // CS0152, two case 1 statements
i++;
return;
}
}
}
}
.NET feedback
.NET is an open source project. Select a link to provide feedback: