Skip to content

Instantly share code, notes, and snippets.

@profesor79
Last active November 1, 2017 21:17
Show Gist options
  • Save profesor79/2e1de052de5d64698f7dd2e59ee26896 to your computer and use it in GitHub Desktop.
Save profesor79/2e1de052de5d64698f7dd2e59ee26896 to your computer and use it in GitHub Desktop.
public class Cat : Animal
{
public Cat(){
base.Sound = "miau miau";
}
}
public abstract class Animal
{
public string Name { get; set; }
public string Sound { get; set; }
public string AboutMe(){
return $"{Name}, {Sound}";
}
}
public List<Animal> MakeAnimal(AnimalType animalType, string[] animalName)
{
List<Animal> animalList = new List<Animal>();
switch (animalType)
{
case AnimalType.cat:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment