send function as parameter c# and invoke it
# cCopyusing System;
namespace pass_function_as_parameter
{
class Program
{
static void functionToPass2(int x)
{
int increment = x + 10;
Console.WriteLine("increment = {0}",increment);
}
static void function2(Action<int> functionToPass2)
{
functionToPass2(22);
}
static void Main(string[] args)
{
function2(functionToPass2);
}
}
}