'object' : an instance of an unmanaged class cannot be embedded within a managed class
The compiler does not allow you to instantiate an unmanaged class inside a managed class. It is possible, though, to have a pointer to an unmanaged class inside a managed class.
The following sample generates C3277:
#using <mscorlib.dll> class X { public: void mf(); }; __gc class Y { private: X m_data; // C3277 // The following line resolves the error. // X* m_data; }; void main() { }