title: How to get actual type of an derived class from its parent interface
body: <p>Let's say we have a code portion like this:</p>
  
  <pre><code>IProduct product = ProductCreator.CreateProduct(); //Factory method we have here
  SellThisProduct(product);
  
  //...
  
  private void SellThisProduct(IProduct product)
  {
    //.. Do something here
  }
  
  //...
  
  internal class Soda : IProduct
  {}
  
  internal class Book : IProduct
  {}
  </code></pre>
  
  <p>How can I infer which product is actually passed into SellThisProduct() method in the method?</p>
  
  <p>I think if I say GetType() or something it will probably return the IProduct type.</p>