C#

C# Class For Making a Deep Copy Clone of an Arbitrary Object

Submitted by Thomas on Sat, 2006-10-14 09:38.

Here is a C# class that can create a deep copy clone of an arbitrary object. The thing that's special about it is that it should work for any class that extends it, so that you don't need to re-write a custom clone() function for every child class (as it seems the C# framework creators would like). This does a deep copy so be careful about members that recursively include one another.

( categories: )
Syndicate content