I am currently attempting to work with lambdas using (possibly) C#’s Func or Action types.
I would like to create an interface called IMyInterface that defines a method called CreateCRUD. This should take 5 parameters. The first is a string. The next four are functions that call create, read, update and delete methods.
interface IMyInterface
{
void CreateCRUD(string name, Action<void> createFunc, Action<void> readFunc, Action<void> updateFunc, Action<void> deleteFunc);
}
The four function definitions should take no parameters and return nothing. The code above does not compile. Please point me in the right direction.
Use the non-generic
Actioninstead.