title: Best practice: How to expose a read-only ICollection
body: <p>I have an <code>ICollection&lt;T&gt;</code> called <code>foos</code> in my class which I want to expose as read-only (see <a href="https://stackoverflow.com/questions/284090/how-to-get-a-readonlycollectiont-of-the-keys-in-a-dictionaryt-s">this question</a>). I see that the interface defines a property <code>.IsReadOnly</code>, which seems appropriate... My question is this: how do I make it obvious to the consumer of the class that <code>foos</code> is read-only? </p>
  
  <p>I don't want to rely on them remembering to query <code>.IsReadOnly</code> before trying a not-implemented method such as <code>.Add()</code>. Ideally, I would like to expose <code>foos</code> as a <code>ReadOnlyCollection&lt;T&gt;</code>, but it does not implement <code>IList&lt;T&gt;</code>. Should I expose <code>foo</code> via a method called, for example, <code>GetReadOnlyFooCollection</code> rather than via a property? If so, would this not confuse someone who then expects a <code>ReadOnlyCollection&lt;T&gt;</code>? </p>
  
  <p>This is C# 2.0, so extension methods like <code>ToList()</code> are not available...</p>