Mid From PDF OOP C# OOP

How is inheritance implemented in C#?

  • Using the colon (:) symbol.
  • Derived class can access public/protected members of the base class.
class Vehicle { public void Start() => Console.WriteLine("Start"); }
class Car : Vehicle { }
Car myCar = new Car();

myCar.Start(); // Inherited method

More from C# Programming Tutorial

All questions for this course
Toolliyo Assistant
Ask about tutorials, ebooks, training, pricing, mentor services, and support. I use public site content only—not admin or internal tools.

care@toolliyo.com

Need callback? Share your details