If I have a pair of classes / interfaces defined in AssemblyA in the AssemblyA.Entities namespace:
public IEntity { string Name { get; set; } } [Serializable] public Entity : IEntity { public string Name { get; set; } }
And I serialize it to XML using XmlSerializer :
var myEntities = new List<IEntity>();
Then, if I duplicate the code / namespaces on AssemblyB so that I have the AssemblyA.Entities namespace and the same code:
public IEntity { string Name { get; set; } } [Serializable] public Entity : IEntity { public string Name { get; set; } }
If I try to deserialize previously serialized XML, will AssemblyB return the AssemblyB list? Or will it fail?
At what point does the serializer stop caring about what it deserializes? Can the assembly be different? Are namespaces different? Are there type names if the properties are called the same?
qJake source share