Methods A and B call method C. Now how to find out inside C who called it?
- by Aseem Gautam
I have some code in method C that will get executed based upon the who called it.
public void C()
{
if(A called me) { .... }
if(B called me) { .... }
}
One way is to use a flag variable. Set the variable before calling C and then inside C process the flag.
Any other ideas?