title: How to get the items count from an IList<> got as an object?
body: <p>In a method, I get an <code>object</code>.</p>
  
  <p>In some situation, this <code>object</code> can be an <code>IList</code> of "something" (I have no control over this "something").</p>
  
  <p>I am trying to:</p>
  
  <ol>
  <li>Identify that this object is an <code>IList</code> (of something)</li>
  <li>Cast the <code>object</code> into an "<code>IList&lt;something&gt;</code>" to be able to get the <code>Count</code> from it.</li>
  </ol>
  
  <p>For now, I am stuck and looking for ideas.</p>