Hi all
I have a c# class that is extending types as follows:
public static class TypeExtensions
{
public static String nameof<TType, TMember>(this TType obj, Expression<Func<TType, TMember>> propertyAccessor)
{
if (propertyAccessor.Body.NodeType == ExpressionType.MemberAccess)
{
var memberExpression = propertyAccessor.Body as MemberExpression;
if (memberExpression == null)
return null;
return memberExpression.Member.Name;
}
return null;
}
}
In C# i would generally access the method like this:
obj.nameof(o => o.PropertyXY)
However, in UiPath Studio I’m not able to do so. The namespace was imported correctly.
Here’s what I’ve tried:
Preformatted text
obj.[nameof](Function(o) o.MemberXY)