Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

Compiler Error CS0153

A goto case is only valid inside a switch statement

An attempt was made to use switch syntax outside of a switch statement.

The following sample generates CS0153:

// CS0153.cs
public class a
   public static void Main()
      goto case 5;   // CS0153
© 2015 Microsoft