Sdílet prostřednictvím


Chyba kompilátoru C3265

Aplikace nemůže deklarovat spravovanou konstruktoru managed v nespravované konstruktoru

Poznámky

Spravovaný objekt nelze zahrnout do nespravovaného kontextu.

Example

Následující příklad reprodukuje C3265:

// C3265_2.cpp
// compile with: /clr /LD
#include <vcclr.h>

ref class A { };

class B
// try the following line instead
// ref class B
{
   A ^a;   // C3265
   // or embed the managed handle using gcroot
   // try the following line instead
   // gcroot<A^> a;
};