Is there any way, in C#, for a class or method to know who (i.e. what class/ method) invoked it?
For example, I might have
class a{
public void test(){
b temp = new b();
string output = temp.run();
}
}
class b{
public string run(){
**CODE HERE**
}
}
Output: "Invoked by the 'test' method of class 'a'."