Let us have the following:
Func<string, int> counterOfChar = (myString) => {
Console.WriteLine("Here is my parameter "+myString);
return myString.Count();
};
I want to bring all expressions involved here , by defining them so:
Expression<Action<string>> first = (param) => Console.WriteLine("Here is my parameter "+param);
Expression<Func<string, int>> second = (param) => param.Count();
And then call Expression.Block(first, second);
as an example .
I am struggling for a week now and I don't want to tell you how diverse are the errors received until this moment. Can someone write the corresponding Block and lambda expression for the delegate, but not going deep into ex: Method.Call ? Just stick to expressions !?
Thank you!