DEV Community

Discussion on: The perfect non-null test

Collapse
 
peledzohar profile image
Zohar Peled

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.