title: Why is the 'this' keyword required to call an extension method from within the extended class
body: <p>I have created an extension method for an ASP.NET MVC ViewPage, e.g:</p>
  
  <pre><code>public static class ViewExtensions
  {
      public static string Method&lt;T&gt;(this ViewPage&lt;T&gt; page) where T : class
      {
          return "something";
      }
  }
  </code></pre>
  
  <p>When calling this method from a View (deriving from <code>ViewPage</code>), I get the error "<em>CS0103: The name 'Method' does not exist in the current context</em>" unless I use the <code>this</code> keyword to call it:</p>
  
  <pre><code>&lt;%: Method() %&gt; &lt;!-- gives error CS0103 --&gt;
  &lt;%: this.Method() %&gt; &lt;!-- works --&gt;
  </code></pre>
  
  <p>Why is the <code>this</code> keyword required? Or does it work without it, but I'm missing something?</p>
  
  <p>(I think there must be a duplicate of this question, but I was not able find one)</p>
  
  <p><strong>Update</strong>:</p>
  
  <p>As <a href="https://stackoverflow.com/questions/3510964/why-is-the-this-keyword-required-to-call-an-extension-method/3511011#3511011">Ben Robinson says</a>, the syntax to call extension methods is just compiler sugar. Then why can't the compiler automatically check the for extension methods of the current type's base types without requiring the this keyword?</p>