public Action<int> GoToFloor { get; set; }
public void GoToReception()
Console.WriteLine("I am at the reception now...");
public static void Main()
var elevator = new Elevator();
elevator.GoToFloor = x => { Console.WriteLine($"Going very fast to the floor number {x}"); };
elevator.GoToReception();
private static void GoFast(int floor)
Console.WriteLine($"Going very fast to the floor number {floor}");