I have existing VB GUI code and I am trying to interface with some C# code but can't work out how to pass the EventHandler to VB.NET.
The C# signature is:
public void SendLatestImages(Guid PatientID, Guid ToPracticeID, EventHandler<ProgressChangedEventArgs> progressChangedHandler)
{
...
}
In VB when I try to consume this, I have
sendImages.SendLatestImages(arg.PatientID, arg.ToPracticeID, ProgressStream_ProgressChanged)
So far so good. But in the ProgressStream_ProgressChanged function I only get:
Private Function ProgressStream_ProgressChanged() As EventHandler(Of SLSyncClient.ProgressChangedEventArgs)
End Function
... There is no access to the actual ProgressChangedEventArgs that I am after. In C#, the signature on this last function is
private void ProgressStream_ProgressChanged(object sender, ProgressChangedEventArgs e)
... which gives me the args as e. What am I missing here?