c # object-oriented / designed inheritance

Inherit
RTTI

RTTI

概念 RTTI(Run Time Type Identification)即通过运行时类型识别,程序能够使用基类的指针或引用来检查着这些指针或引用所指的对象的实际派生类型。

related resources

C # Advanced Programming (11th Edition) Professional C # 7 and .NET Core 2.0

For code comments and issues please check Professional C#'s GitHub Repository

Please check my blog csharp.christiannagel.com for additional information for topics covered in the book.

c#

Parent class, subclass

class animals



 

Guess you like

Origin www.cnblogs.com/scotth/p/11224791.html