DEV Community

Discussion on: Why null in C# is so bad

 
peledzohar profile image
Zohar Peled

True, if you're selecting a list of object, an empty list (or an IEnumerable) would be the obvious choice of what to return when you find nothing that matches the search criteria. For a search of a single object, I see no problem with null. I guess we can simply agree to disagree.