F
fniles
I have a collection inside a class, sometimes when I add to the collection,
I get the error "At least one object must implement IComparable".
What does the error mean ?
Thanks.
Public Class SessionClass
Private Quotes As Collection = New Collection
Sub NewQuote(ByVal Message As String)
Dim swError As StreamWriter
Try
Quotes.Add(Message) '--> error here
Catch ex As Exception
swError = New StreamWriter(Application.StartupPath &
"\AQErrorLog-" & lIndex & "-" & Date.Now.ToString("MMddyy") & ".txt" &
vbCrLf, True)
swError.Write(Now & " Session - NewQuote - error = " &
ex.Message)
swError.Close()
End Try
End Sub
I get the error "At least one object must implement IComparable".
What does the error mean ?
Thanks.
Public Class SessionClass
Private Quotes As Collection = New Collection
Sub NewQuote(ByVal Message As String)
Dim swError As StreamWriter
Try
Quotes.Add(Message) '--> error here
Catch ex As Exception
swError = New StreamWriter(Application.StartupPath &
"\AQErrorLog-" & lIndex & "-" & Date.Now.ToString("MMddyy") & ".txt" &
vbCrLf, True)
swError.Write(Now & " Session - NewQuote - error = " &
ex.Message)
swError.Close()
End Try
End Sub