managed objects in native classes?

  • Thread starter dragonslayer008
  • Start date
D

dragonslayer008

Hi,

I know a managed class can have an unmanaged pointer to a native
object, but is it legal for a native class to have a member reference
to a managed class?
 
S

Sheng Jiang[MVP]

Yes
class CppClass {
public:
gcroot<String^> str; // can use str as if it were String^
CppClass() {}
};
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top