Downcasting

In class-based programming, downcasting, or type refinement, is the act of casting a base or parent class reference, to a more restricted derived class reference. This is only allowable if the object is already an instance of the derived class, and so this conversion is inherently fallible.

Source: Wikipedia — Downcasting (CC BY-SA 4.0)

Downcasting

In class-based programming, downcasting, or type refinement, is the act of casting a base or parent class reference, to a more restricted derived class reference. This is only allowable if the object is already an instance of the derived class, and so this conversion is inherently fallible.

Source: Wikipedia "Downcasting" · CC BY-SA 4.0

Share this article: X · Bluesky
Privacy Policy