title: Why to Use Explicit Interface Implementation To Invoke a Protected Method?
body: <p>When browsing ASP.NET MVC source code in <a href="http://www.codeplex.com/aspnet/SourceControl/FileView.aspx?itemId=266503&amp;changeSetId=17272" rel="noreferrer">codeplex</a>, I found it is common to have a class explicitly implementing interface. The explicitly implemented method/property then invoke another "protected virtual" method/property with same name.</p>
  
  <p>For example, </p>
  
  <pre><code>public class MvcHandler : IHttpHandler, IRequiresSessionState 
  {
      protected virtual bool IsReusable 
      {
          get 
          {
             return false;
          }
      }
  
      bool IHttpHandler.IsReusable 
      {
          get 
          {
             return IsReusable;
          }
      }
  }
  </code></pre>
  
  <p>I'm now sure what's the benefit of this kind of programming. For me, I prefer to just implicitly implement the interface IHttpHandler.</p>
  
  <p>I guess the author just don't want <strong>MvcHandler</strong> has a public property <strong>IsResuable</strong>. The property <strong>IsReusable</strong> can only be used when instance of <strong>MvcHandler</strong> is treated as a <strong>IHttpHandler</strong>. Still, I'm not sure why the author what this way.</p>
  
  <p>Anybody know more benefits about this style of interface implementation?</p>