I tried, wihtout succes, to find an system to get the variable name, as string.
For exemple:
int Index = 5;
log message of index name = index
For this i found Memberinfo and MemberType, but both doesn’t work, for exemple when i do :
System.Reflection.MemberTypes.GetName(index.GetType, index)
That return “Type provided must be an enum”.
I feel like i’m close of the solution, but i need an little help for end this
I simply want to return the name of the variable.
And if it’s possible in every Type, witch mean finding a way for getting the name of the variable even if it’s an string, an int, Datatable or other.
Something like NameofVariable(myvariable) who return “myvariable” and not his value (by the way, nameOf(), doesn’t work neither on uipath)
Also still looking for a way to do this. It’s not a very frequent use case but sometimes for my custom libraries I want to log the name of the variable that is being passed in to the arguments, and the methods for doing this in C# don’t work in UiPath as aarivat mentioned.