I have a Dictionary with key of type UInteger
and the value is List(Of Session)
where the (Public) class Session
contains a couple of variables and a constructor (Public Sub New(...)).
Some of the variables in my Session
class is:
Private count As Integer
Private StartDate As Date
Private Values As List(Of Integer)
and a couple of methods like:
Friend Sub Counter(ByVal c as Integer)
count += c
End Sub
There is no problem to add values to the Dictionary:
Dim Sessions As New List(Of Session)
Dim dict As New Dictionary(Of Integer, List(Of Sessions))
then some code to fill up a couple of Session objects in Sessions (not shown here) and then:
dict.Add(17, Sessions) ''#No problem
Sessions.Clear()
Sessions = dict(17) ''#This doesn't return anything!
The Sessions object is empty even if the code doesn't returned any error. Is my class Session to compex to be stored in a Dictionary?