- Beginning C# 7 Hands-On:Advanced Language Features
- Tom Owsiak
- 78字
- 2021-07-02 15:29:18
Implementing a Generic Interface to Accomplish Sorting
In this chapter, you'll learn upcasting and downcasting and then how to implement a generic interface and how exactly that helps us.
Imagine that you have a list of objects, which you have made of your own type, and you want to sort them. You'll need to figure out just how you can sort these objects. This comes from implementing IComparable, a generic interface that can act on different data types.
推薦閱讀
- 深入理解Bootstrap
- Python機器學習:數據分析與評分卡建模(微課版)
- Nginx Essentials
- 精通Python自然語言處理
- Responsive Web Design by Example
- RISC-V體系結構編程與實踐(第2版)
- 程序設計基礎教程:C語言
- C程序設計實踐教程
- Unity 2017 Mobile Game Development
- Spring+Spring MVC+MyBatis從零開始學
- Flask Web開發:基于Python的Web應用開發實戰(第2版)
- 深入解析Java編譯器:源碼剖析與實例詳解
- Visual C++程序設計全程指南
- HTML5+CSS+JavaScript深入學習實錄
- Mastering VMware vSphere Storage