Hi
I ger the error :"can not be applied for string and void". Any way to fix it?
auto.Horn() works, but i want it into Console.WriteLine.
Thanks
using System; class Vehicle { public virtual void Horn() { Console.WriteLine("horn in general"); } }
class Car : Vehicle { public override void Horn() { Console.WriteLine("horn of car does tuut!"); } }
class Head { static void Main(string[] args) { Car auto = new Car(); Console.WriteLine("Horn does " + auto.Horn()); } }