ActionResult 是⼀个抽象类,ViewResult衍⽣于 ActionResult 类。 ActionResult有⼏种衍⽣类,例
如: ViewResult,JsonResult,FileStreamResult, 等等。
ActionResult 可以⽤来开发多态和动态动象。所以如果你动态运⾏不同类型的视图,ActionResult 是最
好的选择。例如下⾯的代码,你可以看⻅我们有⼀个DynamicView。基于标记(IsHtmlView),它会返回
ViewResult 或 JsonResult