title: Can not access List<string> from another class
body: <p>I am trying to access the List declared in ImageCollection Class. Here is the code.</p>
  
  <pre><code>class ImageCollection
  {
      public List&lt;string&gt; imgCollection = new List&lt;string&gt;();       
  
      public void addImgCollection(string path)
      {
          imgCollection.Add(path);
      }
  
      public List&lt;string&gt; getList()
      {
          return imgCollection;
      }
  }
  </code></pre>
  
  <p>And add the image path into imgCollection from AutoClass using this code.</p>
  
  <pre><code>ImageCollection imgcoll = new ImageCollection();
  imgcoll.addImgCollection(img1);
  imgcoll.addImgCollection(img2);
  </code></pre>
  
  <p>But, when I access the List from MainForm:</p>
  
  <pre><code>ImageCollection image = new ImageCollection();
  List&lt;string&gt; imgcol = image.getList();
  </code></pre>
  
  <p>The result is empty.
  What's wrong with my code?</p>