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 CS0188

The this object cannot be used before all of its fields are assigned to

All fields in a struct have to be assigned by a constructor before the constructor can call a method in the struct.

The following sample generates CS0188:

struct s {
   public int a;

   void f() { 
   }

   s (int i) {
      // a = i;
      f(); // CS0188
   }
}

class MyClass {
   public static void Main() {
   }
}