'How to raise event in a separate class?
I have a class:
Class A
{
public void EncodeMessage(object sender)
{
//Handle the Message received event
}
}
Another class
Class B
{
Message comMessage;
public void RegisterForComMessageChange()
{
comMessage = ExtractComFromShcMessage();
message.MessageReceived+= EncodeMessage;
//How to bind the message received event of this class to the event handler of Class A (i.e EncodeMessage)?
}
}
How do I raise the register for an event in a separate class from that of the event handler?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
