How come the conditional operator (?:) doesn\'t work when used with two types that inherit from a single base type?
The example I have is:
The conditional operator cannot determine the resultant type from its components, which may be either RedirectToRouteResult or RedirectResult. In order to resolve this, you should explicitly cast either (or both) of the components to the base type:
ActionResult foo = (someCondition) ?
(ActionResult)RedirectToAction("Foo","Bar") :
Redirect(someUrl);