Stage 1: Inheritance
Stage 1: Inheritance
Highlights:
Animal.cs
namespace MyApplication.Animals;
public class Animal(string name)
{
public string Name { get; } = name;
public void Eat()
{
Console.WriteLine($"{Name} is eating...");
}
}Cat.cs
Dog.cs
Parrot.cs
Program.cs
Last updated