Serialization disaster

G

Guest

I have a class that once used the [Serializable()] attribute for simple
serialization. I decided that I wanted to take control of how the
serialization happens by implimenting ISerializable. I backed up my
serialized file and was hoping to deserialize the old way and serialize the
new way in order to convert my files to the new serialization. It didn't
work, and I wasn't terribly surprised. However, I converted my class exactly
back to the way it was to the old default serialization(it's a very simple
class) and it still won't deserialize! My files are now permanently corrupt
it seems, which I really took pains to avoid. Is there some way I can
reconstruct a saved object graph so I can figure out what the descrepancy
might be?
The class has one member, and ArrayList, to deserialize. How did I destroy
deserialization by changing a class and then changing it back?
 
S

Stoitcho Goutsev \(100\) [C# MVP]

Hi RichM,

Have you by any chance change name of a class or fields. This will
definitely break deserialization. Make sure also that you have set all your
Serializable/NonSerialize attribute set as they were.
 

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