System.NullReference Exception Adding to a Dictionary [Answered]
I'm really confused why this is happening.
The dictionary in question is an attribute of a class that I've created.
Lecturer class:
I definitely do instantiate a new Lecturer object:
However, it refuses to assign the values taken from the SQL reader into the lecturer's dictionary attribute (CourseLecturers)
In the images attached, you can see that the reader successfully assigns the relevant values from the DB table into the variables, but the variables cannot be assigned to the dictionary for some reason. This is driving me insane, I've been debugging for 6 hours
The dictionary in question is an attribute of a class that I've created.
Lecturer class:
I definitely do instantiate a new Lecturer object:
However, it refuses to assign the values taken from the SQL reader into the lecturer's dictionary attribute (CourseLecturers)
In the images attached, you can see that the reader successfully assigns the relevant values from the DB table into the variables, but the variables cannot be assigned to the dictionary for some reason. This is driving me insane, I've been debugging for 6 hours



