Not
Åtkomst till den här sidan kräver auktorisering. Du kan prova att logga in eller ändra kataloger.
Åtkomst till den här sidan kräver auktorisering. Du kan prova att ändra kataloger.
kan inte deklarera en hanterad "hanterad konstruktion" i en ohanterad "ohanterad konstruktion"
Anmärkningar
Du kan inte inkludera ett hanterat objekt i en ohanterad kontext.
Example
I följande exempel återskapas 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;
};