public static void Main()
Action<string> PerformActionDoNotReturn = new Action<string>(WriteInConsole);
PerformActionDoNotReturn("Yeah i am anAction");
Func<int,int> PerformActionReturnMeSomething = new Func<int,int>(DoubleMyMoney);
Console.WriteLine(PerformActionReturnMeSomething(10000));
Predicate<object> checkStringType = new Predicate<object>(IsThisString);
Console.WriteLine(checkStringType(123));
Console.WriteLine(checkStringType("fddfd"));
static void WriteInConsole(string str)
static int DoubleMyMoney(int mymoney)
return mymoney * mymoney;
static bool IsThisString(object str)
return str is string ? true : false;