delegate problem in translate from c#

  • Thread starter Thread starter is_vlb50
  • Start date Start date
I

is_vlb50

I have problem with translate next code from c# to vb :


private UStateEventHandler _myUStateEventHandler;

//where UStateEventHandler is defined as :
//public sealed delegate UStateEventHandler : System.MulticastDelegate


// Create the event handlers we need.
_myUStateEventHandler = _obj1.CreateEventHandler(new
UStateEventHandler(OnUserStateChange));

// Add the event handlers to the session-global events.
obj1.UStateChanged += _myUStateEventHandler;

//where UStateChanged defined in class library as:
//public abstract new event UStateEventHandler UStateChanged

How I can translate to vb +- ?
Thanks
 
Hi,

Have a look where the instanced class that is about this
_myUStateEventHandler

Then declare it globaly "WithEvents" (this does not exist in C#)

Then put at the end of the method that is handled handles.blabla

Probably the most simple

Cor
 
Back
Top