This is kind of a tangent to this question:
Retrieving the calling method name from within a method
public Main()
{
PopularMethod();
}
public ButtonClick(object sender, EventArgs e)
{
PopularMethod();
}
public Button2Click(object sender, EventArgs e)
{
PopularMethod();
}
public void PopularMethod()
{
//Get calling method name
}
Is it possible to use reflection to get a list of functions that call upon the "PopularMethod" function in it's body? Ie: [Main, ButtonClick, Button2Click]
Aucun commentaire:
Enregistrer un commentaire