mirror of
https://github.com/markjprice/cs11dotnet7.git
synced 2025-12-06 05:32:03 +01:00
17 lines
303 B
C#
17 lines
303 B
C#
class Animal // This is the base type for all animals.
|
|
{
|
|
public string? Name;
|
|
public DateTime Born;
|
|
public byte Legs;
|
|
}
|
|
|
|
class Cat : Animal // This is a subtype of animal.
|
|
{
|
|
public bool IsDomestic;
|
|
}
|
|
|
|
class Spider : Animal // This is another subtype of animal.
|
|
{
|
|
public bool IsPoisonous;
|
|
}
|