title: Implementing GetEnumerator() for a collection inherited from List<string>
body: <p>I am trying to implement <code>FilePathCollection</code>. Its items would be simple file names (without a path - such as "image.jpg"). Once the collection is used via <code>foreach</code> cycle, it should return the full path created by concatenating with <code>baseDirectory</code>. How can I do that? </p>
  
  <pre><code>public class FilePathCollection : List&lt;string&gt;
  {
      string baseDirectory;
  
      public FilePathCollection(string baseDirectory)
      {
          this.baseDirectory = baseDirectory;
      }
  
      new public System.Collections.IEnumerator GetEnumerator()
      {
          foreach (string value in this._items) //this does not work because _list is private
              yield return baseDirectory + value;
      }
  }
  </code></pre>