C Sharp (C#) - Interfaces
What will be printed when the following code runs?
interface IDevice { void TurnOn(); }
class Fan : IDevice {
public void TurnOn() { Console.WriteLine("Fan is on"); }
}
class Program {
static void Main() {
IDevice device = new Fan();
device.TurnOn();
}
}