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.
A goto case is only valid inside a switch statement
An attempt was made to use the switch
statement syntax outside of a switch
statement.
The following sample generates CS0153:
// CS0153.cs
public class a
{
public static void Main()
{
goto case 5; // CS0153
}
}
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.