- C# 7 and .NET Core 2.0 Blueprints
- Dirk Strauss Jas Rademeyer
- 131字
- 2021-08-27 19:55:25
Polymorphism
You might hear of polymorphism referred to as the third pillar of OOP. But if I wrote it in that order above, my mnemonic would no longer work!
Polymorphism is a Greek word that refers to something that has many shapes or forms. We will see an example of this in the Cricket Score Tracking app later on. Just remember that it has two distinct aspects:
- During runtime, a class that is derived from a base class may be treated as an object of the class it inherits. This is seen in parameters, collections, and arrays.
- The base class can define virtual methods that the derived class would then override. The derived class then provides their own implementation of the overridden methods.
Polymorphism is a very powerful feature in OOP.
推薦閱讀
- Qt 5 and OpenCV 4 Computer Vision Projects
- Learning Java Functional Programming
- Learning Real-time Processing with Spark Streaming
- Boost C++ Application Development Cookbook(Second Edition)
- C# Programming Cookbook
- Koa開發(fā):入門、進(jìn)階與實戰(zhàn)
- Python 3網(wǎng)絡(luò)爬蟲實戰(zhàn)
- 移動界面(Web/App)Photoshop UI設(shè)計十全大補
- Scala編程(第5版)
- JavaScript機器人編程指南
- Web前端開發(fā)最佳實踐
- Android初級應(yīng)用開發(fā)
- Android應(yīng)用開發(fā)攻略
- Swift Essentials(Second Edition)
- Perl 6 Deep Dive