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 CS0171

Field 'field' must be fully assigned before control leaves the constructor

A constructor in a struct must initialize all fields in the struct.

The following sample generates CS0171:

struct MyStruct {
   MyStruct(int initField) {   // CS0171
      // i = initField;   // uncomment to resolve this CS0171
   }
   public int i;
}
class MyClass {
   public static void Main() {
      MyStruct aStruct = new MyStruct();
   }
}