title: Changing value of List<Point> item
body: <p>I'm making (school) application for drawing curves. I set the points by mouse clicking and add their positions to list of vertices. Now I'm working on moving of points using actions on mouse down and mouse up. On mouse down I find out if the position of mouse is in small square (4x4 px) around any vertex in list of vertices and then on mouse up I want to change coordinates of vertice to the coordinates where I raised the mouse button up. But I hit the problem with <code>List</code> cause visual studio says that List items couldn't be changed cause it's not the variable. How can I solve this?</p>
  
  <pre><code>List&lt;Point&gt; vertices = new List&lt;Point&gt;(); //list of vertices
  void canvas_MouseUp(object sender, MouseEventArgs e) {
      if (!move) return; //if moving is off returns
      vertices[indexOfMoved].X = e.X; //change X position to new position
      vertices[indexOfMoved].Y = e.Y; //change Y position to new position
      indexOfMovedLabel.Text = "Moved: ?";
  }
  </code></pre>
  
  <p><strong>Problem:</strong>  </p>
  
  <blockquote>
    <p>Error  1   Cannot modify the return value of 'System.Collections.Generic.List.this[int]' because it is not a variable</p>
  </blockquote>