If I have a type, like:
Type type = myObject.GetType ();
How do I make a generic delegate that uses objects of that that type as a parameter? I would expect code something like:
myDelegate = Action<type> (type parameter);
The above code obviously won't and doesn't work as is, but how can I make it work? Can I even make it work?
Ultimately, I have a dictionary of Dictionary < Type, List < Action < > >, which holds a type and a list of delegates that should take an object of that type as parameter.
And should be executed something like this:
myDict[myType][i] (objectOfMyType);
Any suggestions would be greatly appreciated.
Thanks!