using System;
public class Program
{
public static void Main()
Car car = new Car();
car.Go(5);
var speed = car.GetSpeed();
Console.WriteLine("The speed is: " + speed);
}
public class Car
private int speed = 0;
public Action<int> Go
get {
return (speed) => {
this.speed = speed;
Console.WriteLine("This is a lambda");
};
public Func<int> GetSpeed { get { return () => speed; } }