title: Liskov substitution principle and Interface
body: <p>Does the <code>ICollection&lt;T&gt;.Add()</code>-implementation of arrays break the Liskov substitution principle? The method results in a <code>NotSupportedException</code>, which does break the LSP, IMHO.</p>
  
  <pre><code>string[] data = new string[] {"a"};
  ICollection&lt;string&gt; dataCollection = data;
  dataCollection.Add("b");
  </code></pre>
  
  <p>This results in</p>
  
  <blockquote>
    <p>Unhandled exception: System.NotSupportedException: Collection was of
    a fixed size.</p>
  </blockquote>
  
  <p>I found a pretty similar question concerning <code>Stream</code>-implementations. I open a separate question, because this case is pretty different: <a href="https://stackoverflow.com/questions/20290834/liskov-substitution-principle-and-streams">Liskov substitution principle and Streams</a>.
  The difference here is that <code>ICollection</code> does not provide a <code>CanAdd</code>-Property or such thing, as the <code>Stream</code>-class does.</p>