How to make a deep copy of a List of Object
<p>Hi I have  a list of objects(list1) and I'd like to make a copy of this list but I want that the objects in the second list(list2) to  not be linked to the one in first list. </p>

<p>this is what I do</p>

<pre><code>    list&lt;Obj&gt; list1 = new list&lt;Obj&gt;{};
    // I fill the list1 with objects Obj
    // now I want to make a deep copy this is what I do

   list&lt;Obj&gt;  list2 = new list&lt;Obj&gt;(list1);
   // but when I edit an object in list 1 I also edit the object in list2
</code></pre>

<p>I'd like to be able to edit the objects in list1 without  edititng the object in list2,how can I get that???</p>

<p>thanks for your answers</p>