Implementing Interfaces: Comparing Objects Using a Separate Class
Explore how to implement the IComparer interface in a separate class to compare and sort C# objects when you cannot modify their source code. Understand sorting techniques by name length and alphabetical order for custom object collections.
We'll cover the following...
We'll cover the following...
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 ...