Translating delegate usage from C# to VB
- by Homeliss
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!