title: Why does most MVC sample controller code return ActionResult?
body: <p>Just wondering why almost every controller method I see in sample MVC code returns ActionResult, even if it's obvious that the code can only return one type of result. I understand there are certain instances where it's warranted because you may return, say a RedirectResult or a ViewResult depending on the logic, but that's not the case for most of the methods I've seen.</p>
  
  <p>Isn't it tantamount to having a return type of 'object' on a method? Why not just specify JsonResult, or FileResult or ViewResult as the return type? Is there a benefit I'm not seeing to settting the return type to ActionResult on every controller method?</p>
  
  <p>Classic example:</p>
  
  <pre><code>public ActionResult Index()
  {
      return View();
  }
  </code></pre>
  
  <p>Why does this seem to be the norm instead of this:</p>
  
  <pre><code>public ViewResult Index()
  {
      return View();
  }
  </code></pre>
  
  <p><strong>EDIT:</strong> So far all of the responses except for one have indicated that ActionResult is just more generic. I know that much. :) Why is this accepted practice on a controller method though, and not anywhere else? You don't just return the highest level-base classes of a type that you can on a normal method, you attempt to return the most specific type you can usually. What makes controller methods so different that bloggers and "sample code writers" (yes, I made that term up) would just resort to returning ActionResult?</p>