...

/

Implementing Interfaces: Comparing Objects Using a Separate Class

Implementing Interfaces: Comparing Objects Using a Separate Class

Learn how to compare objects and sort instances of a type without direct access to its source code.

Comparing objects using a separate class

Sometimes, we won’t have access to the source code for a type, and it might not implement the IComparable interface. Luckily, there is another way to sort instances of a type. We can create a separate type that implements a slightly different ...