| Answer1: Thanks for your reply !!!
As I mentioned earlier, if i have two or more version software. All the files created in previous versions file should be able to handle in the last version so i want to handle version compatibility. I am talking about Dot net serialization and aware about those concepts. I am using Binary formatter. We can not use .net default serialization. We want to Implement ISerializable interface.
Sample code:
public class Employee :ISerializable { private int version =1;
//ADD emoployee name in this list private ArrayList employeeList;
protected TestData(SerializationInfo info,StreamingContext context) { this.version = info.GetInt32("version"); this.name = info.GetString("list"); }
void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context) { info.AddValue("version", this.version); info.AddValue("list", this.employeeList); } } |