Retrieving the calling method name from within a method [duplicate]
问题 This question already has answers here : Closed 6 years ago . Possible Duplicate: How can I find the method that called the current method? I have a method in an object that is called from a number of places within the object. Is there a quick and easy way to get the name of the method that called this popular method. Pseudo Code EXAMPLE: public Main() { PopularMethod(); } public ButtonClick(object sender, EventArgs e) { PopularMethod(); } public Button2Click(object sender, EventArgs e) {