In this post, we will see how to resolve Invoke async Func stored in a Dictionary
Question:
I have a class that is responsible of storing a bunch of async Funcs to execute them later. The signature of each Func differs only on the Task type. Here is the class:Any ideas? Thanks in advance.
Best Answer:
One way is to usedynamic
, in both the function cache and the delegates:If you have better answer, please add a comment about this, thank you!
Source: Stackoverflow.com