title: Does List<T> create garbage in C# in foreach
body: <p>Correct me if im wrong but while doing a foreach an <code>IEnumerable&lt;T&gt;</code> creates garbage no matter what T is. But I'm wondering if you have a <code>List&lt;T&gt;</code> where  T is Entity. Then say there is a derived class in the list like Entity2D. Will it have to create a new enumerator for each derived class? Therefore creating garbage?</p>
  
  <p>Also does having an interface let's say <code>IEntity</code> as T create garbage?</p>