ObservaleCollection<MyClass> not the same as IEnumerable<IMyInterface>?
<p>I have an interface:</p>

<pre><code>public interface IMyInterface { }
</code></pre>

<p>I have a class which implements the interface:</p>

<pre><code>public class MyClass : IMyInterface { }
</code></pre>

<p>I have a function which asks for an IEnumerable of IMyInterface:</p>

<pre><code>private void TestFunction(IEnumerable&lt;IMyInterface&gt; collectie) { }
</code></pre>

<p>I can't figure out why this doesn't work:</p>

<pre><code>ObservableCollection&lt;MyClass&gt; myClasses = new ObservableCollection&lt;MyClass&gt;();
TestFunction(myClasses); // this line doesn't work
</code></pre>

<p>An ObservableCollection is an IEnumerable, right?</p>

<p>And my class does implement, right?</p>

<p>So why doesn't this work?</p>

<p>It gives this 2 errors:</p>

<blockquote>
  <p>Error 1   The best overloaded method
  match for
  'WindowsFormsApplication1.Form1.TestFunction(System.Collections.Generic.IEnumerable)'
  has some invalid
  arguments C:\spike\spike_rtf\WindowsFormsApplication1\Form1.cs    59  4   WindowsFormsApplication1
  Error 2   Argument '1': cannot convert
  from
  'System.Collections.ObjectModel.ObservableCollection'
  to
  'System.Collections.Generic.IEnumerable'   C:\spike\spike_rtf\WindowsFormsApplication1\Form1.cs    59  17  WindowsFormsApplication1</p>
</blockquote>
