G
Guest
Hi,
I have a problem with part of my code. I am trying to Cache a Generic
Collection
Private nodeCollection As New Generic.List(Of MenuNode)
If (Cache("MainMenu")) = Nothing Then
...
nodeCollection = menudal.FetchMenu()
Cache.Insert("MainMenu", nodeCollection)
End If
Then I read from Cache to populate my menu. When I run the project though, I
get
"InvalidCastException"
Operator '=' is not defined for type 'List(Of MenuNode)' and 'Nothing'.
at the line If (Cache("MainMenu")) = Nothing Then
Any ideas?
I have a problem with part of my code. I am trying to Cache a Generic
Collection
Private nodeCollection As New Generic.List(Of MenuNode)
If (Cache("MainMenu")) = Nothing Then
...
nodeCollection = menudal.FetchMenu()
Cache.Insert("MainMenu", nodeCollection)
End If
Then I read from Cache to populate my menu. When I run the project though, I
get
"InvalidCastException"
Operator '=' is not defined for type 'List(Of MenuNode)' and 'Nothing'.
at the line If (Cache("MainMenu")) = Nothing Then
Any ideas?