static void Main(string[] args) { Crocodile objcro = new Crocodile(); objcro.Eat(); objcro.Swim(); }
static void Main(string[] args) { Crocodile objCro = new Crocodile(); Console.WriteLine(objCro.GetType().Name); objCro.Habitat(); objCro.Eat(); objCro.Drink(); }
public static void Main(string[] args) { Animal[] animalArray = new Animal[2]; Dog d = new Dog("Csipész"); Crocodile c = new Crocodile("Krokk"); animalArray[0] = new Dog("animal1"); animalArray[1] = new Crocodile("animal2"); d.Eat(); c.Eat(); }
public void CrocodileCanInheritEat() { Crocodile crocodile = new Crocodile(); Assert.Equal("I like to eat meat!!!", crocodile.Eat()); }