Skip to content

Using a Comparer to stock items

See how we can use interface inheritance to enable the List class to sort our stock.

Interface inheritance allows people to define a set of features that must be implemented in order to enable objects to collaborate and achieve different ends. In this video, explore the use of interface inheritance to allow the List to sort its contents. To achieve this we must implement the IComparable interface, enabling the list to compare its contents.

The resources of this program will be provided at the end of the Stock Server series!