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 C3178

'type' : unable to initialize a managed object in initializer list

An attempt was made to initialize a member during the creation of an object. Initialize members in a separate instruction.

The following sample generates C3178:

#using<mscorlib.dll>
__value struct V {
   String *s;
};

void main() {
   V v = { S"Hello" };   // C3178
   // The following line resolves the error.
   // V v;
   // v.s = S"Hello";
}