DEV Community 👩‍💻👨‍💻

Discussion on: The perfect non-null test

peledzohar profile image
Zohar Peled Author

object is the ultimate base type for all .Net types. structs implicitly inherits the ValueType class which inherits object, and by definition are value types, meaning they can't be null to begin with - which means that this test will always return true.