title: C# and AForge - Use of unassigned local variable edgePoints
body: <p>I'm trying to compile this code (the last one):
  <a href="http://www.aforgenet.com/framework/features/blobs_processing.html" rel="nofollow">http://www.aforgenet.com/framework/features/blobs_processing.html</a></p>
  
  <p>but it throws: <strong>Use of unassigned local variable 'edgePoints'</strong>  ..</p>
  
  <p>here is the code:</p>
  
  <pre><code>        BlobCounter blobCounter = new BlobCounter();
          blobCounter.ProcessImage(image23);
          Blob[] blobs = blobCounter.GetObjectsInformation();
          GrahamConvexHull hullFinder = new GrahamConvexHull();
          BitmapData data = image23.LockBits(new Rectangle(0, 0, image23.Width, image23.Height), ImageLockMode.ReadWrite, image23.PixelFormat);
          foreach (Blob blob in blobs)
          {
              List&lt;IntPoint&gt; leftPoints, rightPoints, edgePoints;
              blobCounter.GetBlobsLeftAndRightEdges(blob, out leftPoints, out rightPoints);
              edgePoints.AddRange(leftPoints);
              edgePoints.AddRange(rightPoints);
              List&lt;IntPoint&gt; hull = hullFinder.FindHull(edgePoints);
              Drawing.Polygon(data, hull, Color.Red);
          }
          image23.UnlockBits(data);
  </code></pre>
  
  <p>And this is the line that he has problem with:</p>
  
  <pre><code>            edgePoints.AddRange(leftPoints);
  </code></pre>
  
  <p>I tied to assign Null to edgePoints but it failed:</p>
  
  <pre><code>List&lt;IntPoint&gt; leftPoints, rightPoints, edgePoints= null;
  </code></pre>
  
  <p><strong>What's the problem?</strong> I didn't modify source code so everything should work..</p>