gromul
asked on
How to get variable name as string
How do I get variable names in a class as strings through reflection? I know that local variables will be renamed but it should be possible for non-locals.
Thanks
Thanks
foreach(FieldInfo field in myType.GetType().GetFields ()) Console.WriteLine(field.Na me);
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.