DEV Community

Discussion on: No more NullReferenceException for Lists in C#

Collapse
 
nlaslett profile image
Neil Laslett

Forgetting to initialize lists really become a problem in class properties. The way to solve that is in the class constructor. Any list created in the same code where you're using it should be easy to manage.