How can I user reflection to get the fields inside a method? I tried to use the MethodInfo and then GetFields but the values returned are not the fields I defined within the method.
For example, using the code below, how would I get the FieldInfo for LineNo?
private void MyMethod()
{
int LineNo = 0;
}
Thanks
Aucun commentaire:
Enregistrer un commentaire