By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,515 Members | 1,033 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,515 IT Pros & Developers. It's quick & easy.

do i need to create NEW delegate each time i use invoke ?

P: n/a
few questions about Delegate in vb.net :

do i need to create NEW delegate each time i use invoke ?

or i can use the same delegate object when using specific invoke ?

and if can use the same one, in case its multithread application, i need to
put it in synclock ?

--------------
can i change the address of parameter after i created the delegate ?
--------------
Nov 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
do i need to create NEW delegate each time i use invoke ?
No

and if can use the same one, in case its multithread application, i need to
put it in synclock ?
No, not if all you do is call the delegate.

can i change the address of parameter after i created the delegate ?


Then you create a new delegate. You can't re-target an existing
delegate to another method.

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Nov 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.