Hey,
I have the following code in a class that inherits from SortedList.
VB Code:
Public Sub Dispose() Implements System.IDisposable.Dispose Dim entry As DictionaryEntry For Each entry In MyBase.Values CType(entry.Value, Invoice).Dispose() Next End Sub
The for each entry in mybase.value causes the following error
System.InvalidCastException - Specified cast is not valid.
Does anyone know why this is happening? I thought that Values return a dictionary entry.
Thanks,
