0

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?

JMK
  • 27,273
  • 52
  • 163
  • 280
Sanya530
  • 1,209
  • 4
  • 18
  • 24
  • 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

0 Answers0