Custom Event in Interface produce Errors?

  • Thread starter Thread starter BenLeino
  • Start date Start date
B

BenLeino

Hi there,

I have a custom interface with event declarations in it.
One of my classes implements this interace and also its
events.

When i make a new instance from outside the class
(with "new"), i always get the
System.MethodAccessException Error.

When I declare the events WITHOUT interface
implementation, it works fine.

Ist this a knwon Bug of VB.NET, or what am i doing wrong?

Interface looks like this:
Event EvStatus(ByVal intStatusCode As Integer)

Class like this:
Public Event EvStatus(ByVal intStatusCode As Integer)
Implements infPPTDataCollect.EvStatus

Thx for your time
BenLeino
 
* "BenLeino said:
I have a custom interface with event declarations in it.
One of my classes implements this interace and also its
events.

When i make a new instance from outside the class
(with "new"), i always get the
System.MethodAccessException Error.

When I declare the events WITHOUT interface
implementation, it works fine.

Ist this a knwon Bug of VB.NET, or what am i doing wrong?

Interface looks like this:
Event EvStatus(ByVal intStatusCode As Integer)

Class like this:
Public Event EvStatus(ByVal intStatusCode As Integer)
Implements infPPTDataCollect.EvStatus

I am not able to repro that on a .NET 1.0 machine using this code:


Public Class ...
 
I only had to rebuild all packages and then it worked....
strange. Thx anyway :O)

But do you know how to catch events while threading?
I startet a normal Thread and now i can't receive any
events of my class...
 
Back
Top