Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Because the HN crowd likes learning new things: if `enabled` is a nullable boolean in C# (i.e. has type `bool?`) then this check must indeed be written this way, to avoid confusing null with false.


I thought OP meant to imply that the readability could use some tweaking. You have 'disable', 'enabled' and 'False' used in the same expression so it requires some (more) thinking while reading it and trying to decipher what it's trying to do.


That is a more fundamental and better criticism that I'm embarrassed I overlooked.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: