vendredi 1 juillet 2016

Access local variable from where the method is invoked using reflection? [duplicate]

This question already has an answer here:

Is it possible to access a variable which is local to where the method is invoked? Let's say there was a local variable named foo. The method bar that is invoked afterwards needs to access the variable foo without it being passed in as a parameter because I'm going to need to use reflection anyways to get the variable's declared name.





Aucun commentaire:

Enregistrer un commentaire