79438475

Date: 2025-02-14 05:57:25
Score: 1
Natty:
Report link

I know I cannot compare int? and int, yet the following code compiles and runs just fine (VS2022, .Net 4.8).

A valuable life lesson that when reality and your knowledge / expectations are mis-aligned, you need to try and alter your knowledge / expectations rather than reality.

You don't know that at all. Since it isn't true. Comparing an int to a nullable int does not return a nullable bool. It never has.

Is that new compiler behavior?

No.

Reasons:
  • Blacklisted phrase (0.5): I cannot
  • No code block (0.5):
  • Ends in question mark (2):
  • High reputation (-2):
Posted by: mjwills