title: C++/CLI Graphics->DrawArc(DrawLine) in loop clear
body: <p>Problem: I have collection of CircleSegment, when i trying to draw them all at PictureBox, i receive only last CircleSegment from collection on pictureBox. Why?</p>
  
  <pre><code>ref class CircleSegment 
      {
      public:
          array&lt;double&gt;^ massive;
          Pen^ Blackpen;
          int index;
           CircleSegment^ SegmentCircleCollection::operator [] ( const int a ) 
       { 
           return this-&gt;Alfa[a];
       }
      ....
      }
  
  
  ref class SegmentCircleCollection
  {
      public:
      Generic::List&lt;CircleSegment^&gt; ^Alfa;
  ...
  }
  
  
  private: System::Void pictureBox1_Paint(System::Object^  sender, System::Windows::Forms::PaintEventArgs^  e) 
   {   
     //Where SegmentCircleCollection^ myCollection;
     for each(CircleSegment^ Selected in myCollection-&gt;Alfa)
         {
             e-&gt;Graphics-&gt;DrawLine(Selected-&gt;Blackpen,(int)Selected-&gt;massive[6],(int)Selected-&gt;massive[7],(int)Selected-&gt;massive[8],(int)Selected-&gt;massive[9]);
              e-&gt;Graphics-&gt;DrawArc(Selected-&gt;Blackpen,(int)Selected-&gt;massive[0],(int)Selected-&gt;massive[1],(int)Selected-&gt;massive[2],(int)Selected-&gt;massive[3],(int)Selected-&gt;massive[4],(int)Selected-&gt;massive[5]);
         }
  </code></pre>
  
  <p>...</p>
  
  <p>}      </p>