Cloning objects

Topics: APIs
Apr 12, 2015 at 3:55 PM
I understand the implementation of ICloneable and the base of MemberwiseClone, but when I try to use in the real world (XAML) I cannot use it due to many problems, like it is protected, casting to object, COM issues.
Always the alternatives are a 'deep' for each of the properties, serializations. But for instance Storyboard is really hard to clone, it has Arrays and it is imposible to clone in a generalized way. So I do not understand why the option to clone is so complicated if the object is in somepart of the memory and it could be replicated without all this issues. Just a MemoryClone.

Can be possible to implement a real clone of an object?
Apr 12, 2015 at 6:53 PM