catching an event(VB) raised in Assembly(C#)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have an Assembly written in C# and its app in VB.
In the Assembly an event is raised, and it is consumed by the app.
The problem is whenever the event happens, its handler (VB) in the app is
called twice.
The same app written in C# works correctly.
Anyone have ideas?
Thanks in advance.
 
Irene said:
I have an Assembly written in C# and its app in VB.
In the Assembly an event is raised, and it is consumed by the app.
The problem is whenever the event happens, its handler (VB) in the
app is called twice.
The same app written in C# works correctly.
Anyone have ideas?
Thanks in advance.

It sounds like you are subscribing to the event twice in the VB app.
Check to see how the VB app subscribes to the event. Are you using
WithEvents *and* AddHandler? You only need one or the other.

Richard
 
Thanks, Richard.
That's precisely what I did.

Richard Grimes said:
It sounds like you are subscribing to the event twice in the VB app.
Check to see how the VB app subscribes to the event. Are you using
WithEvents *and* AddHandler? You only need one or the other.

Richard
 
Back
Top