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