- 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.
- MySQL數(shù)據(jù)庫(kù)管理實(shí)戰(zhàn)
- SOA實(shí)踐
- Python for Secret Agents:Volume II
- Apache Mahout Clustering Designs
- 零基礎(chǔ)Java學(xué)習(xí)筆記
- Multithreading in C# 5.0 Cookbook
- 零基礎(chǔ)學(xué)C語(yǔ)言第2版
- Managing Microsoft Hybrid Clouds
- Python Deep Learning
- Oracle Database XE 11gR2 Jump Start Guide
- Learning D3.js 5 Mapping(Second Edition)
- 少兒編程輕松學(xué)(全2冊(cè))
- 測(cè)試工程師Python開發(fā)實(shí)戰(zhàn)
- 信息學(xué)奧林匹克競(jìng)賽初賽精講精練
- Go語(yǔ)言編程之旅:一起用Go做項(xiàng)目