title: Linq Query toList() is empty but foreach works
body: <p>I have the following Linq query:</p>
  
  <pre><code>IEnumerable&lt;Network&gt; net = from file in Directory.GetFiles(folder+ @"\network")
                             from lines in File.ReadLines(file).Skip(1)
                             let row = lines.Split(',')           
                             select new Network
                             {
                                 networkname = getnetwork(row),
                                 ...
                                 networkdate = getnetworkdate(row)
                             };
  </code></pre>
  
  <p>when I use toList() on it, the list is empty but when I use a foreach loop where I use an empty List and add each item, it is not. Did I made a mistake in this query or could there be different source for this strange behavior?</p>
  
  <p>UPDATE:
  I am using it in a extension method like this:
  This does not work:</p>
  
  <pre><code>public static void FillFromCsv(this List&lt;Network&gt; network)
      {
         [QUERY HERE]
  
         network = net.toList();
      }
  </code></pre>
  
  <p>This works:</p>
  
  <pre><code>public static void FillFromCsv(this List&lt;Network&gt; network)
      {
         [QUERY HERE]
  
         network.Clear();
         Foreach (Network n in net)
         {
              network.add(n);
         }
      }
  </code></pre>