title: Enumerator Implementation: Use struct or class?
body: <p>I noticed that <code>List&lt;T&gt;</code> defines its enumerator as a <code>struct</code>, while <code>ArrayList</code> defines its enumerator as a <code>class</code>. What's the difference? If I am to write an enumerator for my class, which one would be preferable?</p>
  
  <p><strong>EDIT:</strong> My requirements cannot be fulfilled using <code>yield</code>, so I'm implementing an enumerator of my own. That said, I wonder whether it would be better to follow the lines of <code>List&lt;T&gt;</code> and implement it as a struct.</p>