title: Difference between the classes inherited from ObservableCollection and IList
body: <p>I have created the two different classes. One class inherited from IList and another one class inherited from ObservableCollection. When we create the instance for those classes, I got the below results.</p>
  <p><strong>Inherited from IList</strong></p>
  <pre><code>public partial class MainWindow : Window
  {
      public MainWindow()
      {
          InitializeComponent();
          Cells = new CellCollection();
      }
  
      private CellCollection cells;
  
      public CellCollection Cells
      {
          get { return cells; }
          set { cells = value; }
      }
  }
  
  public class CellCollection : IList&lt;OrderInfo&gt;
  {
      public CellCollection()
      {
      }
  
      public OrderInfo this[int index] { get =&gt; throw new NotImplementedException(); set =&gt; throw new NotImplementedException(); }
  
  
  
      public bool IsReadOnly =&gt; throw new NotImplementedException();
  
      public int Count =&gt; throw new NotImplementedException();
  
      public void Clear()
      {
          throw new NotImplementedException();
      }
  
      public bool Contains(OrderInfo item)
      {
          throw new NotImplementedException();
      }
  
      public void CopyTo(OrderInfo[] array, int arrayIndex)
      {
          throw new NotImplementedException();
      }
  
      public IEnumerator&lt;OrderInfo&gt; GetEnumerator()
      {
          throw new NotImplementedException();
      }
  
      public int IndexOf(OrderInfo item)
      {
          throw new NotImplementedException();
      }
  
      public void Insert(int index, OrderInfo item)
      {
          throw new NotImplementedException();
      }
  
      public bool Remove(OrderInfo item)
      {
          throw new NotImplementedException();
      }
  
      public void RemoveAt(int index)
      {
          throw new NotImplementedException();
      }
  
      internal void Add(OrderInfo orderInfo)
      {
          
      }
  
      void ICollection&lt;OrderInfo&gt;.Add(OrderInfo item)
      {
          throw new NotImplementedException();
      }
  
      IEnumerator IEnumerable.GetEnumerator()
      {
          throw new NotImplementedException();
      }
  }
  
  </code></pre>
  <p><a href="https://i.stack.imgur.com/V53wT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/V53wT.png" alt="Instance maintained for IList" /></a></p>
  <p><strong>Instance maintained for IList.</strong></p>
  <p><strong>Inherited from ObservableCollection</strong></p>
  <pre><code>public partial class MainWindow : Window
  {
      public MainWindow()
      {
          InitializeComponent();
          Cells = new CellCollection();
      }
  
      private CellCollection cells;
  
      public CellCollection Cells
      {
          get { return cells; }
          set { cells = value; }
      }
  }
  
  public class CellCollection : ObservableCollection&lt;OrderInfo&gt;
  {
      public CellCollection()
      {
  
      }
  
  
  }
  
  
  </code></pre>
  <p><a href="https://i.stack.imgur.com/meP5X.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/meP5X.png" alt="Instance not maintained for Observable collection, Count only maintained" /></a></p>
  <p><strong>Instance not maintained for Observable collection, Count only maintained</strong></p>
  <p>Could you explain the difference for both?</p>