D
Derek Martin
Hi List, I have an arraylist of objects. I have created my own IComparable
in the object to return the sort on datetime. This works great! Now, I'd
like to invert the sort. Currently, it gives me 4/1/05 before 4/5/05
(good), but I'd like to have 4/5/05 before 4/1/05 (better!) for my
application.
Public Function CompareTo(ByVal obj As Object) As Integer Implements + _
System.IComparable.CompareTo
If TypeOf obj Is glcobject Then
Dim tmp As glcobject = DirectCast(obj, glcobject)
Return m_datetime.CompareTo(tmp.m_datetime)
End If
End Function
???
Thanks!
Derek
in the object to return the sort on datetime. This works great! Now, I'd
like to invert the sort. Currently, it gives me 4/1/05 before 4/5/05
(good), but I'd like to have 4/5/05 before 4/1/05 (better!) for my
application.
Public Function CompareTo(ByVal obj As Object) As Integer Implements + _
System.IComparable.CompareTo
If TypeOf obj Is glcobject Then
Dim tmp As glcobject = DirectCast(obj, glcobject)
Return m_datetime.CompareTo(tmp.m_datetime)
End If
End Function
???
Thanks!
Derek