Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Delphi-News aus aller Welt (https://www.delphipraxis.net/58-delphi-news-aus-aller-welt/)
-   -   Virtual methods in Delphi (https://www.delphipraxis.net/208301-virtual-methods-delphi.html)

DP News-Robot 12. Jul 2021 11:00

Virtual methods in Delphi
 
Virtual methods enable subtype polymorphism - in other words, they allow implementing different behavior in descendant classes.


That means if you have a base TShape class with a virtual Paint method, and several descendant classes like TRectangle, TCircle and TTriangle, then each of those subclasses can implement a different Paint method to appropriately paint itself. You can call the Paint method on any shap

Weiterlesen...


Alle Zeitangaben in WEZ +1. Es ist jetzt 02:48 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz