Inheritance lets a class derive from a base class, reusing and extending its members. Polymorphism lets you treat derived objects through a base type, with the correct overridden method called at runtime (via virtual/override). These are core OOP mechanisms in C#.
Inheritance
{
Name { ; ; }
=> ;
}
:
{
=> ;
=> Console.WriteLine();
}
dog = Dog { Name = };
dog.Name;
dog.MakeSound();
