Translating delegate usage from C# to VB
Posted
by Homeliss
on Stack Overflow
See other posts from Stack Overflow
or by Homeliss
Published on 2010-04-01T02:14:04Z
Indexed on
2010/04/01
2:23 UTC
Read the original article
Hit count: 557
ContactManager.PostSolve += PostSolve;
I am having a problem converting this piece of code from C# to VB.NET. ContactManager.PostSolve
is a delegate.
I tried the following but it doesn't work, it says PostSolve is not an event of ContactManager:
AddHandler ContactManager.PostSolve, AddressOf PostSolve
The following works, but this only allows me to have one handler for the delegate:
ContactManager.PostSolve = new PostSolveDelegate(AddressOf PostSolve)
Is there a way for me to do the same thing in VB that was done in the first piece of code?
Thanks!
© Stack Overflow or respective owner