title: Method accepting ObservableCollection<T> as parameter
body: <p>I have a few ObservableCollections with different object models, all inheriting from the same base model. For example:</p>
  
  <pre><code>class Food { }
  class Pizza : Food { }
  class Rice : Food { }
  class Spaghetti : Food { }
  </code></pre>
  
  <p>and an ObservableCollection for each one:</p>
  
  <pre><code>ObservableCollection&lt;Pizza&gt; pizzaOC;
  ObservableCollection&lt;Rice&gt; riceOC;
  ObservableCollection&lt;Spaghetti&gt; spOC;
  </code></pre>
  
  <p>Then I have a method which has an <code>ObservableCollection&lt;Food&gt;</code> parameter, like so:</p>
  
  <pre><code>private bool CheckFood(ObservableCollection&lt;Food&gt; foodItems)
  {
      // stuff here
  }
  </code></pre>
  
  <p>The problem comes when I try to do the calls :</p>
  
  <pre><code>CheckFood(pizzaOC);
  CheckFood(riceOC);
  //...
  </code></pre>
  
  <p>Is there any way I can call a single method, but passing different types of ObservableCollections? And also, is there a way to find out in the method, which OC type has been passed?</p>