Type is not marked as serializable.

E

ericmhhui

Hi,

I have the following C++ code snippet that always give me the error.

The type A in Assembly ........... is not marked as serializable.

when I try to run it. My class already has the [Serializable]
attribute.

What am I still missing or I am doing something wrong completely?


[Serializable]
__gc class A
{
public:
A(void);
~A(void);
String* S;
bool B;
void Calc ();
Assembly* A;
MethodInfo* M;
};


void myfunc ()
{
AppDomain* Ad = AppDomain::CreateDomain ("myAd");
A* objA = new A ();
Ad->DoCallBack (new CrossAppDomainDelegate (objA, &A::Calc) );
}
 

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