In physics library written in C# I have the following code:
(in ContactManager.cs)
public delegate void PostSolveDelegate(Contact contact, ref ContactImpulse impulse);
public PostSolveDelegate PostSolve;
And an example that uses that code is:
(in Test.cs)
public virtual void PostSolve(Contact contact, ref ContactImpulse impulse)
{
}
ContactManager.PostSolve += PostSolve;
I'd like to do the same in VB. (just thandling the delegate, not the declaration)
I tried this, but it doesn't work:
AddHandler ContactManager.PostSolve, AddressOf PostSolve
The following works, but 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!