Referring to a Stack overflow discussion related to creating the deep copy methods for a class using extension methods, which doesn't needs [Serializable] attribute:
How do you do a deep copy of an object in .NET (C# specifically)?
Class that I have is a singleton class, and it is an old implementation:
Can I create a deep copy of the same, I understand by definition it is not possible, but trying to understand, if there's a workaround that is possible in such a typical scenario. I understand that other option for me would be to change the class to non singleton, but in our current design and usage that would be lots of work and may lead to number of issues.
Also the current class has multiple other custom classes being referred, so when I am going for a deep copy, especially the way it is in the following code by Alex Burtsev:
https://raw.github.com/Burtsev-Alexey/net-object-deep-copy/master/ObjectExtensions.cs
Do I need to have the extension method for all the classes being referred, I am assuming that would be the case.