(de) Serialiazation - Different projects?

mrnugger

Member
Joined
Aug 20, 2006
Messages
6
Im making a mapmaker, and to save the map I just serialize a type Map class holding all my information, and to load it into the mapmaker I just deserialize the file I serialized and load it into an empty class.

This works fine, but Im kind of new to serializing (I used to use VB and saved map as arrays in text files, etc.) and I was wondering on how to save a serialized file lets say from ProjectA, and load it into ProjectB. Ive tried deserializing a file serialized from another project, but it gives me an error :confused: .

:)
 
One possible way is to put the class into a shared library that both projects reference - this way it should keep consistent on disk structures.

An alternative (and personally how I would do it) is look at using XML serialisation - this produces a xml file that isnt dependent on the assembly generating it to read it back in.
 
Back
Top