Get EventHandler Change Notification without Creating Instance or Making it static

  • Thread starter Thread starter ID GO
  • Start date Start date
I

ID GO

Guest
c# : Get EventHandler Change Notification without Creating Instance or Making it static


Public class A
{
public EventHandler KeyboardCloseEventHandlerTest;


private void someMethod(object sender, EventArgs e)
{
KeyboardCloseEventHandlerTest?.Invoke(sender, e);
}
}

Public class B
{
public EventHandler KeyboardCloseEventHandlerTest1;

private void Tesssss(object sender, EventArgs e)
{
}

}


I need class A EventHandler to registered in Class B and Fire Class Method.

I can't make anything static not create a instance. More Importantly it should not cause performance Issue.

Continue reading...
 

Similar threads

Back
Top