title: Have both Json actionresult and HttpStatusCodeResult as possible outcomes, but only one return
body: <p>I like to design my methods with only one return statement, for a various number of reasons (I see it as best practice).</p>
  
  <p>But how can i have a mvc controllers actionresult create a result object, where i can put both a HttpStatusCodeResult into, aswell as a normal Json result?</p>
  
  <p>Both of them inherits from ActionResult.</p>
  
  <p><strong>Edit:</strong>
  <strong>An example of what i have now, but would like to change to only 1 return statement, would be like this:</strong></p>
  
  <pre><code>public ActionResult Test(string inputString = "stack")
  {
      try
      {
          int carrots = int.Parse(inputString);
          return Json(new { Data = carrots }, JsonRequestBehavior.AllowGet);
      }
      catch (Exception)
      {
          return new HttpStatusCodeResult(400);
      }
  }
  </code></pre>