I read a lot of articles where people describes how to create a deep copy of list. But it requires a lot of code or work with memory streams. Is there any other easier way to create independent copy of List of class objects?
Asked
Active
Viewed 78 times
0
-
Either you have to implement IClonable interface youself for all the objects you want to clone or you have to work with memory streams (serialization etc.). There's no other way I think – sjkm Nov 20 '13 at 12:00
-
Or just use immutable types and then you don't need to clone it at all. ;) – Matthew Watson Nov 20 '13 at 12:01