i'm trying to sort a generic array using Collections Sort function with below sample app, i get a runtime error: RunError(211) call to abstract method,
As the base class for your helper, you used a class that has an abstract method. Abstract methods are only announcements, they have no implementation. The implementation is in derived classes.
The TCustomArrayHelper class has an overloaded Sort method that is public. But inside the implementation of the Sort method (all its variants) there is a call to the QuickSort method. This method is located in the protected section of the TCustomArrayHelper class and is abstract (i.e. there is no implementation in the base class).
You have 2 options:
- implement the QuickSort method in your class (with the override modifier),
- inherit from a class that already has a protected QuickSort method implemented.
Look in the Generics.Collections module and review the code for the TCustomArrayHelper class.