A C# like delegate