Click here to Skip to main content
15,913,854 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
What is use of invoke method and what are it's parameters?
Posted

Not only Control.Invoke, also Dispatcher.Invoke. Not only Invoke, also BeginInvoke. Control.Invoke is only for System.Windows.Forms, but Dispatcher works both for Forms and WPF.

Please read my past Answers on the topic, very detailed:
Control.Invoke() vs. Control.BeginInvoke()[^],
Problem with Treeview Scanner And MD5[^].

Also, there are more Invoke methods, of events and delegates, and the method invocation in Reflection (see the Answer by Girish) in particular.

—SA
 
Share this answer
 
v4
Comments
girish sp 13-Apr-11 5:41am    
very detailed..mine 5!!
Sergey Alexandrovich Kryukov 13-Apr-11 6:15am    
Thank you, Girish.
--SA
Sandeep Mewara 13-Apr-11 5:49am    
:)I started with basic one based on 'how' the OP asked.

Take my 5!
Sergey Alexandrovich Kryukov 13-Apr-11 6:15am    
Thank you, Sandeep.
--SA
[here^]

this should help,
 
Share this answer
 
v2
Comments
Sergey Alexandrovich Kryukov 13-Apr-11 5:36am    
Missed reference.
Please also see my Answer -- very detailed.
--SA
Sergey Alexandrovich Kryukov 13-Apr-11 6:17am    
Gosh, this is yet another Invoke I almost forgot (even though heavily used it). So, a 5!
(Well, I mentioned other Invokes collectively :-)
--SA
girish sp 13-Apr-11 6:20am    
thanks SAK
Sergey Alexandrovich Kryukov 13-Apr-11 6:19am    
OK, I referenced your Answer (and "your" Invoke) in mine now.
Teamwork! :-)
--SA
girish sp 13-Apr-11 6:22am    
now,your collection helps me in future!!
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 13-Apr-11 5:38am    
This is only one Invoke, there are more. (4 this time, OK?)
Please see my Answer.
--SA
Sandeep Mewara 13-Apr-11 5:50am    
Yeah Ok! :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900