C
Chukkalove
I've had to change a class within an application.
The previous developer used serialization to store objects to file. He didnt
use ISerializable interface and even if he had.....
I just dont trust or like using serialization just for the reasons Im asking
for help about.
He used binary serialization, and Im getting errors when the file is read
from disk as the class has changed.
I need to be able to read files created with previous versions of this
software.
I added IDeserializable to try to diagnose the problem, but the deserialize
call fails at bfSkin.Deserialize and my callback to OnDeserialization is
never called.
Is there anything that i can do to step through the deserialization of my
object so that I could at least have a go at fixing it please?
FileStream fsSkin = new FileStream(sFileName, FileMode.Open);
BinaryFormatter bfSkin = new BinaryFormatter();
// Deserialize the object graph
rSkinFile=null;
try
{
rSkinFile = (SkinFile) bfSkin.Deserialize(fsSkin);
The previous developer used serialization to store objects to file. He didnt
use ISerializable interface and even if he had.....
I just dont trust or like using serialization just for the reasons Im asking
for help about.
He used binary serialization, and Im getting errors when the file is read
from disk as the class has changed.
I need to be able to read files created with previous versions of this
software.
I added IDeserializable to try to diagnose the problem, but the deserialize
call fails at bfSkin.Deserialize and my callback to OnDeserialization is
never called.
Is there anything that i can do to step through the deserialization of my
object so that I could at least have a go at fixing it please?
FileStream fsSkin = new FileStream(sFileName, FileMode.Open);
BinaryFormatter bfSkin = new BinaryFormatter();
// Deserialize the object graph
rSkinFile=null;
try
{
rSkinFile = (SkinFile) bfSkin.Deserialize(fsSkin);