- C# 7 and .NET Core Cookbook
- Dirk Strauss
- 135字
- 2021-07-03 00:11:59
How it works...
At the heart of generics lies the ability to reuse a single class or method. It allows developers to essentially not repeat similar code throughout your code base. This conforms well to the Don't Repeat Yourself (DRY) principle. This design principle states that a specific bit of logic should be represented in code only once.
Using generic classes, for example, also allows developers to create a class that is type safe when compiling. Type safe basically means that the developer can be assured of the type of the object and can use the class in a specific way without experiencing any unexpected behavior. Therefore, the compiler takes over the burden of type safety.
Generics also allow developers to write less code, because code can be reused and less code also performs better.
- Qt 5 and OpenCV 4 Computer Vision Projects
- 一步一步學Spring Boot 2:微服務項目實戰
- 程序員面試白皮書
- Visual FoxPro程序設計教程(第3版)
- Cocos2d-x游戲開發:手把手教你Lua語言的編程方法
- ASP.NET Core Essentials
- Servlet/JSP深入詳解
- Spring Cloud、Nginx高并發核心編程
- WebRTC技術詳解:從0到1構建多人視頻會議系統
- Python Web數據分析可視化:基于Django框架的開發實戰
- Python機器學習之金融風險管理
- Python硬件編程實戰
- Java Web開發教程:基于Struts2+Hibernate+Spring
- 企業級Java現代化:寫給開發者的云原生簡明指南
- 計算機系統解密:從理解計算機到編寫高效代碼