This post has the comment if you need to call the method multiple times, use reflection once to find it, then assign it to a delegate, and then call the delegate..
- How and why does this
delegatework faster? Can anyone has some example? - Can I call this
caching? If so, are there any other method than this caching method with delegate?
ADDED
I came up with an example of using delegate here.
A delegate is simply a pointer to a function. If you’re using reflection (at all) there is generally a lot of overhead associated with it. By finding this methods address once and assigning that address to your delegate variable, you are in effect caching it.
So, it’s not the “delegate” type that works faster, it’s just that you’re “computing” once and “using” it multiple times that grants you the speed increase.