
Originally Posted by
Wormbo
Dude, UDK is superbly documented, compared to how it was back in the day up to UT2004. Also, what's so hard to understand about that part? The comparison function returns an int value, whose sign tells, whether elements are in the correct order. Array.Sort() is a native function that calls the comparison function whenever two elements need to be compared for correct order in the array. What algorithm Sort() actually uses is irrelevant (though I'd expect it to be some flavor of Quicksort), you only need to care about the comparison function.
A "delegate block" really is a delegate variable and an anonymous function acting as default value for the delegate. The only delegate involved is the parameter of the Sort() function, to which you pass a matching function reference as usual.
Bookmarks