title: Visual Studio's enumeration during debugging (Results View): "Entry point was not found.":""
body: <p>In some cases, when trying to expand the <em>Results View</em> of an <em>IEnumerable</em> in visual studio might cause the error: <em>Entry point was not found.":"</em>.</p>
  
  <p>So I decided to test a little, and I found out that it happens when the class has a generic parameter (which we will call <em>T</em>) and that implements <em>IEnumerable[Bar[T]]</em> (something that doesn't directly uses <em>T</em>) or something that doesn't uses <em>T</em> at all, like <em>IEnumerable[string]</em> (these may not be the only cases).</p>
  
  <p>Here's an example class that visual studio cannot expand <em>Results View</em> properly:</p>
  
  <pre><code>class Foo&lt;T&gt; : IEnumerable&lt;List&lt;T&gt;&gt; {
      readonly List&lt;List&lt;T&gt;&gt; l;
      public Foo() {
          l = new List&lt;List&lt;T&gt;&gt;();
      }
      public void Add(List&lt;T&gt; l) {
          this.l.Add(l);
      }
      public IEnumerator&lt;List&lt;T&gt;&gt; GetEnumerator() {
          return l.GetEnumerator();
      }
      IEnumerator IEnumerable.GetEnumerator() {
          return GetEnumerator();
      }
  }
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/oKZML.png" alt=""></p>
  
  <p><img src="https://i.stack.imgur.com/b0onS.png" alt=""></p>
  
  <p>And here's an example class which visual studio successfully enumerates:</p>
  
  <pre><code>class Foo&lt;T&gt; : IEnumerable&lt;T&gt; {
      readonly List&lt;T&gt; l;
      public Foo() {
          l = new List&lt;T&gt;();
      }
      public void Add(T value) {
          l.Add(value);
      }
      public IEnumerator&lt;T&gt; GetEnumerator() {
          return l.GetEnumerator();
      }
      IEnumerator IEnumerable.GetEnumerator() {
          return GetEnumerator();
      }
  }
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/Qo3WP.png" alt=""></p>
  
  <p>This only happens in debug mode. If you try to iterate through the enumerable, you'll see it's working as intended.</p>
  
  <p>Does any have an idea on why this happens or how to solve it?</p>
  
  <p>This is probably a similar post to this one: <a href="https://stackoverflow.com/questions/23202302/entry-point-was-not-found-">https://stackoverflow.com/questions/23202302/entry-point-was-not-found-error-when-attempting-to-expand-the-results-view</a></p>
  
  <p>However, I felt like I wanted to provide some additional information.</p>