Junior
From PDF
OOP
C# OOP
What is inheritance?
- Inheritance is an OOP mechanism where a class (derived/child) inherits
properties and methods from another class (base/parent).
- Promotes code reusability and hierarchical relationships.
class Vehicle { public void Start() => Console.WriteLine("Vehicle
started"); }
class Car : Vehicle { } // Car inherits from VehicleShare this Q&A
Share preview image: https://www.toolliyo.com/images/toolliyo-logo.png