I found many solutions here in SO and others that relate to deep cloning of an object through serialization / deserialization (in memory and vice versa).
This requires that the classes to be cloned are marked [Serializable] . I have my classes (well, most of them) marked with [DataContract] because I use the DataContractSerializer for serialization in XML.
I only introduced the [Serializable] attribute due to the need for deep cloning of some of these class instances. However, now something has happened with serialization / deserialization through DCS, because it no longer works - errors waiting to use another XML element for deserialization. If I remove [Serializable] , the errors go away.
What are my options? I just want to deeply clone my objects as simple as possible.
source share