title: dynamic vs var in C#
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/961581/whats-the-difference-between-dynamicc-4-and-var">What&rsquo;s the difference between dynamic(C# 4) and var?</a>  </p>
  </blockquote>
  
  <p>What is the difference between dynamic and var keyword in .NET 4.0 (VS 2010). As per MSDN, the definition of dynamic is - <em>Dynamic lookup allows you to write method, operator and indexer calls, property and field accesses, and even object invocations which bypass the normal static binding of C# and instead gets resolved dynamically</em>.</p>
  
  <p>Whereas the definition for var is - <em>An implicitly typed local variable is strongly typed just as if you had declared the type yourself, but the compiler determines the type</em>.</p>
  
  <p>How is this different in the code context below:</p>
  
  <pre><code>var a1 = new A();
  a1.Foo(1);
  
  dynamic a2 = new A();
  a2.Foo(1);
  </code></pre>