I.T. Discussion Community!
-Collapse +Expand
To/From Code
-Collapse +Expand Cross Ref Guide
-Collapse +Expand Members-Only
Sign in to see member-only pages.
   ► KBTo/From GuidesDelphiData Structures  Print This     

Prevent Derivation (Cross Ref > Data Structures)

By Mike Prestwood

Delphi versus Access VBA: A side by side comparison between Delphi and Access VBA.

 
OOP Details
 

More object oriented (OO) stuff.

Prevent Derivation

[Other Languages] 

Languages Focus

How do you prevent another class from inheriting and/or prevent a class from overriding a member.

Delphi:  "Sealed class" sealed, final

With Delphi, use the sealed keyword to prevent a class from being inherited from and use the final keyword to prevent a method from being overridden.

Syntax Example:
type
  Robot = class sealed(TObject)
public
  procedure Speak(pSentence: String); virtual; final;
end;
Access VBA:   Not Supported













Follow PrestwoodBoards on: 


©1995-2020 PrestwoodBoards  [Security & Privacy]
Professional IT Services: Coding | Websites | Computer Tech