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

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.
 
R

Richard Grimes [MVP]

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
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top