Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
When fired, two events will enter same method. How can I find out in that method,
which event occured ?

PDStateChanged = +onStateChanged();
MDStateChanged = +onStateChanged();


What I have tried:

I need something like :
if(PDStateChanged)
{} 
else if(MDStateChanged)
{}<pre>
Posted
Updated 21-Jan-18 23:04pm
Comments
Alex Schunk 22-Jan-18 5:04am    
You can't

1 solution

You can't, not really.
The simplest way is to direct the two events to separate methods which call a common method with a parameter which specifies the source.
 
Share this answer
 
Comments
Member 13568484 22-Jan-18 5:05am    
Thank You :)
OriginalGriff 22-Jan-18 5:11am    
You're welcome!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900