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 C3828

'object type': placement arguments not allowed while creating instances of managed classes

When creating an object from a managed type, you cannot use the placement form of operator new.

The following sample generates C3828:

#using <mscorlib.dll>

__gc struct M {
};

char bytes[256];

void main() {
   M *m1 = new (&bytes) M();   // C3828 
   // The following line resolves the error.
   // M *m1 = new M();
}