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 CS1023

Embedded statement cannot be a declaration or labeled statement

An embedded statement, such as the statements following an if statement, can contain neither declarations nor labeled statements.

The following sample generates CS1023 twice:

namespace x {
   public class a {
      public static void Main() {
         int i = 0;
         if (1)
            int i;   // CS1023, declaration is not valid here
         if (1)
         xx:   i++;   // CS1023, labeled statement is not valid here
      }
   }
}