Reputation: 708
How do you rewrite the following to work in older vb.net environments? This is not working with build machine?
Just create a function that takes in two AuctionInfos returns an integer? Then do the addressof thang?
tempItems.Sort(
Function(aInfo1 As AuctionInfo, aInfo2 As AuctionInfo)
Return aInfo1.StartTime.CompareTo(aInfo2.StartTime)
End Function)
Upvotes: 0
Views: 145
Reputation: 708
This seems to work...
tempItems.Sort(AddressOf AuctionSorter)
Public Shared Function AuctionSorter(aInfo1 As AuctionInfo, aInfo2 As AuctionInfo) As Integer
Return aInfo1.StartTime.CompareTo(aInfo2.StartTime)
End Function
Upvotes: 1