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 CS0573

'field declaration' : cannot have instance field initializers in structs

You can declare, but not initialize, a variable in a struct.

The following sample generates CS0573:

namespace x {
   public class clx {      
      public static void Main(){}
   }
   public struct cly {
      clx a = new clx();  // CS0573
      // clx a;           // OK
      int i = 7;          // CS0573
      // int i;           // OK
   }
}