You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For this code here, I see a prompt telling me that it is possible to throw an InvalidOperationException (even though it won't) - which is good behavior.
int? bar = null;
var foo = bar.Value; //<-- PROMPT HERE
However, when I check .HasValue, which is pretty much a solid guarantee that calling .Value will not throw an InvalidOperationException, I still get the same prompt.
int? bar = null;
int foo;
if (bar.HasValue)
foo = bar.Value; //<-- PROMPT HERE
else
foo = 0;
The text was updated successfully, but these errors were encountered:
For this code here, I see a prompt telling me that it is possible to throw an
InvalidOperationException
(even though it won't) - which is good behavior.However, when I check
.HasValue
, which is pretty much a solid guarantee that calling.Value
will not throw anInvalidOperationException
, I still get the same prompt.The text was updated successfully, but these errors were encountered: