Why can't I do this?
if ((bool)Request["genericError"] != true) { return; }
The compiler gives me:
Cannot convert type 'string' to 'bool'
Request["genericError"] must be an object, so why does the compiler consider it a string?
I'm looking for a reason for this, not how to get around it (using Convert )
source share