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

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.

主站蜘蛛池模板: 定襄县| 金昌市| 紫云| 乌恰县| 郎溪县| 元谋县| 新河县| 新河县| 武安市| 密山市| 祁门县| 临江市| 大宁县| 怀来县| 育儿| 巍山| 五家渠市| 奎屯市| 延长县| 策勒县| 伊通| 宜黄县| 龙游县| 山西省| 新绛县| 汾阳市| 洞口县| 明水县| 藁城市| 灵山县| 唐山市| 红安县| 巴里| 鄂伦春自治旗| 辽中县| 济南市| 汤阴县| 堆龙德庆县| 玉环县| 湖南省| 丹凤县|