Hi Amir,
The difference between the Invoke and DynamicInvoke is Invoke requires the
target object that instantiated the method as parameter to execute the method.
But DynamicInvoke doesn't require the target object without which it calls
the method dynamically with the parameter list.
If the method is static then null can be passed as target object in Invoke
during which Invoke is similar to that of DynamicInvoke.
Invoke
Delegate objdel = new Delegate (this. Meth1);
Objdel.Method.Invoke (targetobject, new object [] {"params"});
If the method is static then
Objdel.Method.Invoke (null, new object [] {"params"});
DynamicInvoke
Objdel.DynamicInvoke (new object [] params);
Mihir Solanki
http://www.mihirsolanki.com
Hi to all.
Whats the difference between DynamicInvoke and Invoke methods of the
Delegate class?
Thanks in advance.