For serialization experts...

T

To

Hi. I've two big serialization problems:

The first is about the <nonserialized> attribute on a field on a mother
class. His inheritance seems to be effective only if the member is public.
If it is not the case, when I try to seriliazise the child class, vb tries
to serialize my non serializable member!!!!

The second problem is about the serialization of a class which inherit from
a hastable. The hashtable implements ISerializable so I must redefine a
"getObjectData" method in ordre to specify wich member should be serialize.
But I don't want to have a method like this in every collection I use!!!!
I'd prefer a system with the <serializable> attribute on the class wich
serialize every member not declared <nonserialized>. Is there a way to avoid
it??

Thank tou very much!

Thibaut
 
O

Oleg Skopincevs

Hi there,

Have you considered implementing your very own serializer class?
You could as well implement a new attribute that you could mark your
non-serializable elements of the class with.

Cheers,
Oleg
 
T

To

I'd like to do it but I can't. The collections I use already inherit from
hashtable. I'm in a real project configuration. There are already a lot of
users of this class. Unfortunately I can't rebuild the model....
Thank you
 

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