Can you name the parameters in a Func type?

You can’t do it with the built-in Func types, but it’s easy enough to create your own custom delegate type and use it in a similar way:

_messageProcessing.Add("input", (x, y, z) => "output");
_messageProcessing.Add("another", (x, y, z) => "example");

// ...

delegate string DispatchFunc(DynamicEntity first, DynamicEntity second,
                             IEnumerable<DynamicEntity> collection);

Dictionary<string, DispatchFunc> _messageProcessing;

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)