In this chapter, you learned about generic methods, which are methods that can operate on different data types. You also learned about constraining a method in terms of the data types that it can operate on, a concept called constraints. You created a GenMethods class, wrote a Swap function, compared values using the CompareTo method, learned about constraints, and modified the program to perform additional types of comparisons and to work with different data types.
In the next chapter, you will learn about up casting, down casting, and then how to implement a generic interface and how that exactly helps us.