官术网_书友最值得收藏!

Summary

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.

主站蜘蛛池模板: 五峰| 陵川县| 罗源县| 锦州市| 广安市| 读书| 中方县| 昌黎县| 阜阳市| 曲水县| 迁西县| 高密市| 鹤山市| 天全县| 安康市| 班玛县| 平阳县| 武隆县| 阳城县| 柳江县| 大方县| 保亭| 靖江市| 湖口县| 栖霞市| 凤阳县| 德安县| 永嘉县| 会宁县| 阳原县| 灵台县| 阳谷县| 周宁县| 盘山县| 咸阳市| 湖北省| 长岛县| 轮台县| 镇平县| 中阳县| 简阳市|