Posted on: 8/5/2014 12:08:25 PM | Views : 453

I'm trying to sort a list of fileinfo structures in my website, and to display them.  After they are sorted, I bind them to a datagrid.
I find that I can't get the sort to work. I do this:
mylist.Sort(AddressOf ClassStrings.CompareFileInfos) Where 'classStrings' is another class, with the following routine:
Public Shared Function CompareFileInfos( _ ByVal x As FileInfo, ByVal y As FileInfo) As Integer If x Is Nothing Then If y Is Nothing Then ' If x is Nothing and y is Nothing, they're ' equal. Return 0 Else ' If x is Nothing and y is not Nothing, y ' is greater. Return -1 End If End If If y Is Nothing And Not x Is Nothing Then Return 1 End If If x.Name < y.Name Then ...

Go to the complete details ...