I have a compare function as follows:
It works perfectly for quoteID's such as ABC123, ABC234, ABC222
But now I want to compare doubles (where as before I was comparing strings)
The call to the above function would be
Code:
Private Class QuoteSorter
Implements IComparer
' Calls CaseInsensitiveComparer.Compare with the parameters reversed.
Public Function Compare(ByVal x As Object, ByVal y As Object) As Integer Implements IComparer.Compare
Dim q1 = x.quoteid
Dim q2 = y.quoteid
Return New CaseInsensitiveComparer().Compare(q1, q2)
End Function
End Class
But now I want to compare doubles (where as before I was comparing strings)
The call to the above function would be
Code:
' sort the array by quoteid
Me.Sort(New QuoteSorter)