Questions about Making reflection fly and exploring delegates...
If I need to create delegates Func<T, TResult>
to methods on dynamically loaded types I could potentially use (1) Delegate.CreateDelegate
(2) DynamicMethod
(3) Expression
trees.
Lets say the set of dynamically loaded types/methods are reflected once at application startup via config and used throughout the lifetime of the app (start-up performance is not an issue and neither is memory), the delegates are cached and dispatched to in a strongly-typed way. These delegates are hot paths accessed concurrently.
Which dynamic binding method would you prefer and why?