mirror of
https://github.com/markjprice/cs11dotnet7.git
synced 2026-04-05 06:15:24 +00:00
Initial commit
This commit is contained in:
parent
7a4066f965
commit
bf63cf7d4b
6 changed files with 212 additions and 110 deletions
16
vscode/Chapter03/SelectionStatements/Animals.cs
Normal file
16
vscode/Chapter03/SelectionStatements/Animals.cs
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
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;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue