public ActionResult Hello()
{
// Returns a user-defined content type, in this case a string.
return Content("hello world!");
}
Action methods typically return a result that is known as an action result. The ActionResult class is the base class for all action results. The ActionInvoker decide which type of action result to return based on the task that the action method is performing.
It is possible be explicit about what type to return, but generally it not necessary.
public ContentResult Hello()
{
// Returns a user-defined content type, in this case a string.
return Content("hello world!");
}
You can know more about it here: Asp.Net Mvc: ContentResult vs. string