I have this code:
class SomeClass {
void someFunction()
{
Action<string> myAction = (what)=>
{
//whatever
}
new List<string>().ForEach(myAction);
}
}
I’d like to extract the code inside myAction into a separate member function.
How do I do that?
This should be equivalent:
Since
Action<string>meansa method with a string parameter which does not return a value.