- Beginning C# 7 Hands-On:Advanced Language Features
- Tom Owsiak
- 119字
- 2021-07-02 15:29:16
Summary
In this chapter, you learned about the basics of making a simple generic class, so that one class can operate on many different data types. A great benefit of generics is flexibility. You created a simple generics class that worked with different data types, made generic parameters, initialized a collection of integers to their array and displayed the results, and then changed the data types in the generics class to doubles and decimals.
In the next chapter, you will learn about generic methods, or methods that can operate on different data types. You will also learn about constraining a method in terms of the data types that it can operate on, so we'll add a concept called constraints.
推薦閱讀
- Learning Chef
- Building a RESTful Web Service with Spring
- Scratch 3游戲與人工智能編程完全自學教程
- QGIS:Becoming a GIS Power User
- Learning Zurb Foundation
- Python爬蟲、數據分析與可視化:工具詳解與案例實戰
- 搞定J2EE:Struts+Spring+Hibernate整合詳解與典型案例
- R語言數據挖掘:實用項目解析
- Mastering PowerCLI
- Design Patterns and Best Practices in Java
- 一覽眾山小:ASP.NET Web開發修行實錄
- Implementing DevOps with Ansible 2
- SQL Server 2012數據庫管理與開發(慕課版)
- Learning Scrapy
- 新手學Visual C