C Sharp (C#) - Interfaces
Given the interface and classes below, how would you write a method PerformWork that accepts any IWorker and calls its Work() method?
interface IWorker { void Work(); }
class Employee : IWorker {
public void Work() { Console.WriteLine("Employee working"); }
}
class Robot : IWorker {
public void Work() { Console.WriteLine("Robot working"); }
}