Export (0) Print
Expand All
Expand Minimize

Compiler Error CS0139 

Error Message

No enclosing loop out of which to break or continue

A break or continue statement was encountered outside of a loop.

For more information, see Jump Statements.

The following sample generates CS0139 twice:

// CS0139.cs
namespace x
{
   public class a
   {
      public static void Main()
      {
         continue;  // CS0139
         break;     // CS0139
      }
   }
}

Community Additions

ADD
Show:
© 2014 Microsoft