Editing one List<> edits it's clone
<p>I have this list of custom class objects:</p>

<pre><code>List&lt;URL&gt; URLs = new List&lt;URL&gt;();
</code></pre>

<p>and I'm trying to push a copy on to a Stack:</p>

<pre><code>Stack&lt;List&lt;URL&gt;&gt; undo = new Stack&lt;List&lt;URL&gt;&gt;();

List&lt;URL&gt; temp = new List&lt;URL&gt;();
temp.AddRange(new List&lt;URL&gt;(URLs));
undo.Push(temp);
</code></pre>

<p>Now whenever I delete an object from the original (URLs) list everything is OK with the one on the stack (temp). But when I delete a list element from a list inside the object in the original (URLs) the same element dissapears in the copy of that object's list that is on the stack.</p>

<p>I delete objects from URLs the same way I delete list elements inside that object.
Does anyone know why this is happening?</p>
