Serialization of collection

  • Thread starter Thread starter Shane Story
  • Start date Start date
S

Shane Story

I am confused on serializtion.

I have a class called picture. It has a bitmap member and several others.

I have a collection class called pictures which inherits from
collectionbase.

How should I best serialize them? They are part of a larger object graph of
course, but so far I am having trouble and have tried various things.

The thing is, that it seems to be so complex and such a black box, that when
something goes wrong, I have no idea what to do to fix it.

TIA,

Shane
 
After much research--causing my project to be in limbo for a while--and
after reading many articles and all, I decided that serialization is great
for a temporary short-term thing, but for long term persistence appears
half-baked and problem ridden. For this reason, I just implemented my own
"serialization" Interface in each object and pass them a binarywriter or
binaryreader, each object saves its version and then if changes occur I can
handle it there.

Since I wrote it, it is no longer a black box.

This is my thinking with many of the nice features that MS puts out. There
is a lot of good stuff but too much control has to be given up to us it and
you don't know what to do if it breaks.

Thanks anyhow.

Shane
 

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

Back
Top