title: Microsoft Guidelines for Collections: Confused about several parts
body: <p>I'm looking at Microsoft's <a href="https://msdn.microsoft.com/en-us/library/dn169389%28v=vs.110%29.aspx" rel="noreferrer">Guidelines for Collections</a> and I find a few parts hard to understand:</p>
  
  <p><strong>X DO NOT use <code>ArrayList</code> or <code>List&lt;T&gt;</code> in public APIs</strong>. Does this mean that I should avoid returning <code>List&lt;T&gt;</code> altogether, or that I could return it as an <code>IEnumerable</code>/<code>IList</code>, but not explicitly as <code>List&lt;T&gt;</code>?</p>
  
  <p><strong>✓ DO use the least-specialized type possible as a parameter type. Most members taking collections as parameters use the <code>IEnumerable&lt;T&gt;</code> interface</strong>. After seeing ReSharper complain about "possible multiple enumeration of IEnumerable", I thought it was a better idea to take (and return) <code>ICollection&lt;T&gt;</code> when I was expecting a pre-computed, finite collection of objects (i.e. not a lazy stream). Isn't that the case?</p>
  
  <p><strong>✓ DO use <code>Collection&lt;T&gt;</code> or a subclass of <code>Collection&lt;T&gt;</code> for properties or return values representing read/write collections</strong>. Why not use <code>ICollection&lt;T&gt;</code>? I thought interfaces were preferable to concrete classes.</p>