I'm trying to do something like:
bool? Verified;
Verified = Request.QueryString["verifed"]==null
? null :bool.Parse(Request.QueryString["verifed"]);
But I'm getting the error:
Type of conditional expression cannot be determined because there is no implicit conversion between
<null>
andbool
Is there a simple single line way to do this, rather than doing it like:
if (Request.QueryString["confirmed"] == null)
Confirmed = null;
else
Confirmed = bool.Parse(Request.QueryString["confirmed"]);