Click here to Skip to main content
15,848,726 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 :
else if(MDStateChanged)
Updated 22-Jan-18 0:04am
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
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