Possible en double:
How can I find the method that called the current method?C# Méthode appelant
Salut, comment puis-je déterminer l'appelant d'une méthode à partir de la méthode? Par exemple:
SomeNamespace.SomeClass.SomeMethod() {
OtherClass();
}
OtherClass() {
// Here I would like to able to know that the caller is SomeNamespace.SomeClass.SomeMethod
}
Merci
Dupe - http://stackoverflow.com/ questions/171970/comment-je-trouve-la-méthode-que-dite-la-méthode-courante et http://stackoverflow.com/questions/280413/c-how-do-you-find-the- caller-function-closed – William