title: c# How to downcast an object
body: <p>I have the following list of slide objects. Based on the value of object's 'type' var I want to upcast the Slide object in the list. Is it possible?</p>
  
  <pre><code>foreach(Slide slide in slidePack.slides)
  {
      if(slide.type == SlideType.SECTION_MARKER)
      {
        //upcast Slide to Section
      }
  }
  </code></pre>
  
  <p><code>Section</code> extends <code>Slide</code> and adds one more parameter.</p>