Fermé en double exact de "How can I find the method that called the current method?"Comment trouvez-vous la fonction d'appelant?
Est-this possible avec C#?
void main()
{
Hello();
}
void Hello()
{
// how do you find out the caller is function 'main'?
}
http://stackoverflow.com/questions/171970/how-can-i-find-the-method-that-called-the-current-method? –
Cette question est un doublon de [http://stackoverflow.com/questions/171970/how-can-i-find-the-method-that-called-the-current-method](http://stackoverflow.com/questions/171970/how-can-i-find-the-method-that-called-the-current-method) –