static void Main(string[] args) { var fish = new Fish(new Animal(), new Swimmable()); var animal = new Animal(); var walk = new Walkable(); var dog = new Dog(animal, walk); var type = dog.GetType(); dog.Age = 12; dog.Walk(type); Console.WriteLine(dog.Age); fish.Swim(fish.GetType()); }
public Dog(Animal animal, Walkable walkable) { _animal = animal; _walkabel = walkable; }