public static void Main()
Console.WriteLine("Testing Func Method");
Class1 cls = new Class1();
cls.RunTheMethodUsingAction( () => { cls.actionMethod("input string example"); } );
public int Method1(string input)
Console.WriteLine($"{input} called from Method 1");
public int Method2(string input)
Console.WriteLine($"{input} called from Method 2");
public bool RunTheMethodUsingFunc(Func<string, int> myMethodName)
int i = myMethodName("My String");
return RunTheMethodUsingFunc(Method1);
public void actionMethod(string s){
Console.WriteLine("Action Method executed with string = " + s);
public bool RunTheMethodUsingAction(Action actn)