title: Do I need to use dynamic_cast when calling a function that accepts the base class?
body: <p>I have some classes like this:</p>
  
  <pre><code>interface class IA
  {
  };
  
  interface class IB
  {
  };
  
  public ref class C : public IA, public IB
  {
  };
  
  public ref class D
  {
      void DoSomething(IA^ aaa)
      {
      }
  
      void Run()
      {
          C^ bob = gcnew C();
          DoSomething(dynamic_cast&lt;IA^&gt;(bob));    // #1
          DoSomething(bob);           // #2
      }
  };
  </code></pre>
  
  <p>At the moment I always try to use dynamic casting when calling such a function, (the #1 above).<br>
  However it does make the code quite ugly, so I want to know if it is actually necessary.</p>
  
  <p>Do you use dynamic_cast in this way? If so what is the main reason?</p>