title: Why does string not implement IList<char>?
body: <p><em>Title says all</em> </p>
  
  <p><strong>Why does <code>String</code> implement <code>IEnumerable&lt;char&gt;</code> and not <code>IList&lt;char&gt;</code>?</strong>  </p>
  
  <p>A string has a length and you can already take elements from a specific index.<br>
  And it could be indicated that it is immutable with <code>ICollection&lt;char&gt;.IsReadOnly</code>.</p>
  
  <p><em>So what could be wrong with it? Am I missing something?</em></p>
  
  <p><strong>As many answers point on that:</strong>
  There is not an interface for read only lists/collections alone, but as <code>ReadOnlyCollection&lt;T&gt;</code> shows I think its definitely possible and with it's <code>IsReadOnly</code> Property designed for such cases.</p>
  
  <pre><code>   public class String : IList&lt;char&gt;
      {
          int IList&lt;char&gt;.IndexOf(char item)
          {
              // ...
          }
  
          void IList&lt;char&gt;.Insert(int index, char item)
          {
              throw new NotSupportedException();
          }
  
          void IList&lt;char&gt;.RemoveAt(int index)
          {
              throw new NotSupportedException();
          }
  
          char IList&lt;char&gt;.this[int index]
          {
              set
              {
                  throw new NotSupportedException();
              }
          }
  
          void ICollection&lt;char&gt;.Add(char item)
          {
              throw new NotSupportedException();
          }
  
          void ICollection&lt;char&gt;.Clear()
          {
              throw new NotSupportedException();
          }
  
          public bool Contains(char item)
          {
              // ...
          }
  
          public void CopyTo(char[] array, int arrayIndex)
          {
              // ...
          }
  
          int ICollection&lt;char&gt;.Count
          {
              get { return this.Length; }
          }
  
          public bool IsReadOnly
          {
              get { return true; }
          }
  
          bool ICollection&lt;char&gt;.Remove(char item)
          {
              throw new NotSupportedException();
          }
  
          // ...
      }
  </code></pre>