title: c# "as" vs "()" conversion
body: <p>Why the conversions between compatible reference types will compile (Excel 2010, .Net 4.5) in this case</p>
  
  <pre><code>using Excel = Microsoft.Office.Interop.Excel;
  Excel.Application excelApplication = null;
  excelApplication = new Excel.Application();
  
  Excel.Worksheet worksheet = workbook.Worksheets[1] as Excel.Worksheet;
  </code></pre>
  
  <p>and in the case below it will not, although I saw exampales shown like that:</p>
  
  <pre><code>Excel.Worksheet worksheet = (Excel.Worksheet)workbook.Worksheets[1];
  </code></pre>
  
  <p>In this case I get the following compiling error :</p>
  
  <pre><code>&gt; CSC : error CS0518: Predefined type 'Microsoft.CSharp.RuntimeBinder.Binder' is not 
  defined or imported
  
  &gt; error CS1969: One or more types required to compile a dynamic expression cannot be 
  found. Are you missing a reference?
  </code></pre>
  
  <p>Best,</p>
  
  <p><strong>EDIT</strong> : Thanks to the both answerer below the following explanation sounds reasonable:</p>
  
  <blockquote>
    <p><strong>without including Microsoft.CSharp in the Project References for projects with .Net Version >= 4.0, support for
    inter operation between the Dynamic Language Runtime (DLR) and C# is not
    possible</strong>, i.e. no dynamic cast is possible.</p>
  </blockquote>