DeSerialize
-
Hi, I have a problem I've been trying to solve for a couple of days now. I posted it before but couldn't get an answer that worked so I'm trying again. I'm serializing an arraylist containing my own classes to a file. It works just fine. I can deserialize this again solong as the application doing the deserializing is the same as the one doing the serializing. When trying to deserialize in another application I get an invalidcastexception, as far as I can see this is because the programname saved in the file is not the same as the programname trying to deserialize. Can someone please tell me if and how I can work around this? Thanks! Andreas Färnstrand
-
Hi, I have a problem I've been trying to solve for a couple of days now. I posted it before but couldn't get an answer that worked so I'm trying again. I'm serializing an arraylist containing my own classes to a file. It works just fine. I can deserialize this again solong as the application doing the deserializing is the same as the one doing the serializing. When trying to deserialize in another application I get an invalidcastexception, as far as I can see this is because the programname saved in the file is not the same as the programname trying to deserialize. Can someone please tell me if and how I can work around this? Thanks! Andreas Färnstrand
See the sample for the BinaryFormatter.Binder property on MSDN for something similar to what you want. Yes, even I am blogging now!
-
See the sample for the BinaryFormatter.Binder property on MSDN for something similar to what you want. Yes, even I am blogging now!
Thanks Daniel! With some modifications that worked perfectly. Andreas Färnstrand