I am hitting a wall with this. I have created a class called ValueList with these properties:
IDvalues as Dictionary
isHardCoded as Boolean = True
ValList as String
I added a constructor with this:
IdValues = New Dictionary
The constructor was added because I discovered that IDValues was nil when the class was instantiated.
Note: this is a Web app, if that changes anything.
Then under Session I added two properties based on my ValueList class. Up to this point everything is (or seems) fine.
In a method I need to get data from a database and add it to the IDValues property. If I create a new ValueList object in the method, all is fine.
But if I reference Session.VLSpecialite in the same method, for example:
Session.VLSpecialite.IDValues.Value(key) = data
Then I get a NilObjectException. Can’t tell which object is null, it can be VLSpecialite or IDValues, Session not being shown in the debugger. . . may be under RunTime, but it’s hard to make it’s way there.
By the way I have set a break point in the class constructor, the code never stopped there ?!?
Does someone has a clue as what’s wrong ?
Thanks a million