NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Compiler Error CS0159

No such label 'label' within the scope of the goto statement

The scope defined by a switch statement does not include the label that was referenced in a goto statement.

The following sample generates CS0159:

namespace x
{
   public class a
   {
      public static void Main()
      {
         int i = 0;
         switch (i)
         {
            case 1:
               goto case 3;   // CS0159, no case 3 label
            case 2:
         }
      }
   }
}