Changing a point in a list
<p>I've written a simple class, <code>point</code>, and I want to use it in a list.</p>

<p>In the list I have 3 points. If I print it:</p>

<pre><code>for (int i = listOfPoint.Count -1; i &gt;=0; i--)
{
    Console.WriteLine(listOfPoint[i].toString());
}
</code></pre>

<p>the output is:</p>

<pre class="lang-none prettyprint-override"><code>(32, 10)
(33, 10)
(34, 10)
</code></pre>

<p>now, I want to do this:</p>

<pre><code>for (int i = listOfPoint.Count -1; i &gt; 0; i--)
{
    listOfPoint[i] = listOfPoint[i - 1];
}
</code></pre>

<p>after this - print:</p>

<pre class="lang-none prettyprint-override"><code>(33, 10)
(34, 10)
(34, 10)
</code></pre>

<p>after this - I want to change the Y value of <code>listOfPoint[0]</code>, so:</p>

<pre class="lang-none prettyprint-override"><code>listOfPoint[0].Y = 11;
</code></pre>

<p>print the list again and the output is:</p>

<pre class="lang-none prettyprint-override"><code>(33, 10)
(34, 11)
(34, 11)
</code></pre>

<p>Why isn't the output:</p>

<pre>(33, 10)
<strong>(34, 10)</strong>
(34, 11)</pre>

<p>And how can I do it like this?</p>
