Please tell me about how to get a field name from an instance variable.
public class MainClass
{
public void output()
{
Action valAction = new TestClass().testAction;
//I want to output string 'testAction' from valAction variable here
Debug.WriteLine(valAction.????);
}
}
public class TestClass
{
public Action testAction = () => { };
}
Aucun commentaire:
Enregistrer un commentaire