how to store each click of mouse in an integer array
<p>I Have a bresenham algorithm which I wrote it in class Line
I Can draw lines Now I wanted to draw polygons so I wrote it's function(void Polygon)
I should store coordinates of each click  in an array and then my function should get them
I don't know how to store each click<br>
Radiobutton1 is for draw line and radiobutton2 is for drawing polygons</p>

<pre><code>private void panel1_MouseClick(object sender, MouseEventArgs e)
        {           
           if(radioButton1.Checked)
            if (firstClick)
            {
                firstX = e.X;
                firstY = e.Y;
                firstClick = false;
            }
            else
            {
              Line l = new Line(firstX, firstY, e.X, e.Y, panel1.CreateGraphics(), Convert.ToInt32(textBox1.Text));

              firstClick = true;

            }
           if(radioButton2.Checked)
            {
       //how to write here so as to store each click in array

                }
            }

        private void button1_Click(object sender, EventArgs e)
        {
            int n = Convert.ToInt32(textBox2.Text);

            Polygon(n, coor);
        }
   void Polygon(int n,int[] coordinates)
     {
       if(n&gt;=2)
      {
         Line l=new Line(coordinates[0],coordinates[1],coordinates[2],coordinates[3],panel1.CreateGraphics(), Convert.ToInt32(textBox1.Text));
         for(int count=1;count&lt;(n-1);count++)
             l=new Line(coordinates[(count*2)],coordinates[((count*2)+1)],coordinates[((count+1)*2)],coordinates[(((count+1)*2)+1)],panel1.CreateGraphics(), Convert.ToInt32(textBox1.Text));
      }
</code></pre>
